On Mon 03 Dec 2007, Torsten Foertsch wrote:
> On Mon 03 Dec 2007, Torsten Foertsch wrote:
> > 30.diff
> > expands tabs in *.p[lm]
> > This patch is too big for the 100000 byte limit of the mailing list and
> > will be sent in 2 parts.
>
> Part 1
Part 2
Index: t/response/TestAPI/server_util.pm
===================================================================
--- t/response/TestAPI/server_util.pm (revision 29)
+++ t/response/TestAPI/server_util.pm (revision 30)
@@ -110,7 +110,7 @@
# no file argument gives ServerRoot
{
- my $server_root_relative =
+ my $server_root_relative =
Apache2::ServerUtil::server_root_relative($r->pool);
ok t_filepath_cmp(canonpath($server_root_relative),
Index: t/response/TestAPI/request_util.pm
===================================================================
--- t/response/TestAPI/request_util.pm (revision 29)
+++ t/response/TestAPI/request_util.pm (revision 30)
@@ -40,7 +40,7 @@
}
else {
eval { $r->document_root('/tmp/foo') };
- ok t_cmp($@, qr/Can't run.*in the threaded env/,
+ ok t_cmp($@, qr/Can't run.*in the threaded env/,
"document_root is read-only under threads");
ok 1;
}
Index: t/response/TestError/api.pm
===================================================================
--- t/response/TestError/api.pm (revision 29)
+++ t/response/TestError/api.pm (revision 30)
@@ -21,7 +21,7 @@
# PerlOptions -GlobalRequest is in effect
eval { my $gr = Apache2::RequestUtil->request; };
- ok t_cmp($@,
+ ok t_cmp($@,
qr/\$r object is not available/,
"unavailable global $r object");
Index: t/response/TestDirective/perldo.pm
===================================================================
--- t/response/TestDirective/perldo.pm (revision 29)
+++ t/response/TestDirective/perldo.pm (revision 30)
@@ -12,7 +12,7 @@
sub handler {
my $r = shift;
- plan $r, tests => 22, need_module('mod_alias');
+ plan $r, tests => 22, need_module('mod_alias');
ok t_cmp('yes', $TestDirective::perl::worked);
@@ -53,22 +53,22 @@
ok t_cmp($@, "", "PerlSections dump syntax check");
ok t_cmp($TestDirective::perldo::test::Include, qr/perlsection.conf/);
-
+
#Check for correct Apache2::ServerUtil->server behavior
my $bport = $TestDirective::perl::base_server->port;
my $vport = $TestDirective::perl::vhost_server->port;
ok defined $bport && defined $vport && $vport != $bport;
-
+
foreach my $url (qw(scalar scalar1 scalar2)) {
my $res = GET "/perl_sections_perlconfig_$url/";
ok t_cmp($res->is_success, 1, '$PerlConfig');
}
-
+
foreach my $url (qw(array1 array2)) {
my $res = GET "/perl_sections_perlconfig_$url/";
ok t_cmp($res->is_success, 1, '@PerlConfig');
}
-
+
Apache2::Const::OK;
}
Index: t/response/TestDirective/cmdparms.pm
===================================================================
--- t/response/TestDirective/cmdparms.pm (revision 29)
+++ t/response/TestDirective/cmdparms.pm (revision 30)
@@ -47,7 +47,7 @@
foreach my $method (@methods) {
$srv_cfg->{$args}{$method} = $parms->$method();
}
- $srv_cfg->{$args}{check_ctx} =
+ $srv_cfg->{$args}{check_ctx} =
$parms->check_cmd_context(Apache2::Const::NOT_IN_LOCATION);
$srv_cfg->{$args}{limited} = $parms->method_is_limited('GET');
Index: t/response/TestDirective/env.pm
===================================================================
--- t/response/TestDirective/env.pm (revision 29)
+++ t/response/TestDirective/env.pm (revision 30)
@@ -18,7 +18,7 @@
# %ENV
ok t_cmp(env_get('srv1'),
- 'env_dir1',
+ 'env_dir1',
'%ENV per-dir override per-srv');
ok t_cmp(env_get('srv2'),
Index: t/response/TestDirective/perlloadmodule.pm
===================================================================
--- t/response/TestDirective/perlloadmodule.pm (revision 29)
+++ t/response/TestDirective/perlloadmodule.pm (revision 30)
@@ -38,7 +38,7 @@
my ($class, $parms) = @_;
bless {
- path => $parms->path || "/",
+ path => $parms->path || "/",
}, $class;
}
@@ -48,7 +48,7 @@
my %new = ();
@new{keys %$base, keys %$add} =
- (values %$base, values %$add);
+ (values %$base, values %$add);
return bless \%new, ref($base);
}
@@ -69,7 +69,7 @@
my ($class, $parms) = @_;
debug "$class->SERVER_CREATE\n";
return bless {
- name => __PACKAGE__,
+ name => __PACKAGE__,
}, $class;
}
Index: t/response/TestDirective/perlloadmodule3.pm
===================================================================
--- t/response/TestDirective/perlloadmodule3.pm (revision 29)
+++ t/response/TestDirective/perlloadmodule3.pm (revision 30)
@@ -112,7 +112,7 @@
$secs{"2: Location"} = $dir_cfg;
}
- $r->printf("Processing by %s.\n",
+ $r->printf("Processing by %s.\n",
$s->is_virtual ? "virtual host" : "main server");
for my $sec (sort keys %secs) {
Index: t/response/TestDirective/perlrequire.pm
===================================================================
--- t/response/TestDirective/perlrequire.pm (revision 29)
+++ t/response/TestDirective/perlrequire.pm (revision 30)
@@ -26,7 +26,7 @@
Apache2::Const::OK;
}
-my %require_tests =
+my %require_tests =
(
main => 'PerlRequired by Parent',
vh => 'PerlRequired by VirtualHost',
Index: t/lib/TestCommon/MemoryLeak.pm
===================================================================
--- t/lib/TestCommon/MemoryLeak.pm (revision 29)
+++ t/lib/TestCommon/MemoryLeak.pm (revision 30)
@@ -18,7 +18,7 @@
# % t/TEST -maxclients 1 -start
#
# of course use maxclients 1 only if your test be handled with one
-# client, e.g. proxy tests need at least two clients.
+# client, e.g. proxy tests need at least two clients.
#
# Now repeat the same test several times (more than 3)
#
Index: t/lib/TestCommon/SameInterp.pm
===================================================================
--- t/lib/TestCommon/SameInterp.pm (revision 29)
+++ t/lib/TestCommon/SameInterp.pm (revision 30)
@@ -100,7 +100,7 @@
in the same_interp framework one runs
- my $res = Apache::TestRequest::same_interp_do($same_interp,
+ my $res = Apache::TestRequest::same_interp_do($same_interp,
\&GET, $url, @data);
but if there is a failure to find the same interpreter we get an
Index: t/lib/TestAPRlib/date.pm
===================================================================
--- t/lib/TestAPRlib/date.pm (revision 29)
+++ t/lib/TestAPRlib/date.pm (revision 30)
@@ -45,7 +45,7 @@
# parse_http
for my $date_str (@http_dates) {
ok t_cmp(APR::Date::parse_http($date_str),
- $date_msec,
+ $date_msec,
"parse_http: $date_str");
#t_debug "testing : parse_http: $date_str";
}
@@ -53,7 +53,7 @@
# parse_rfc
for my $date_str (@rfc_dates) {
ok t_cmp(APR::Date::parse_rfc($date_str),
- $date_msec,
+ $date_msec,
"parse_rfc: $date_str");
#t_debug "testing : parse_rfc: $date_str";
}
Index: t/lib/TestAPRlib/status.pm
===================================================================
--- t/lib/TestAPRlib/status.pm (revision 29)
+++ t/lib/TestAPRlib/status.pm (revision 30)
@@ -15,7 +15,7 @@
return 2;
}
-sub test {
+sub test {
ok APR::Status::is_EAGAIN(APR::Const::EAGAIN);
ok ! APR::Status::is_EAGAIN(APR::Const::ENOPOLL);
}
Index: t/lib/TestAPRlib/table.pm
===================================================================
--- t/lib/TestAPRlib/table.pm (revision 29)
+++ t/lib/TestAPRlib/table.pm (revision 30)
@@ -334,7 +334,7 @@
$table2->set($_**2 => $_**2) for 1..20;
my $table2_copy = APR::Table::make($pool, 1);
$table2_copy->set($_ => $_) for 1..20;
-
+
my $overlay = $table2_copy->overlay($table2, $pool->new);
{
# see the comment for above's:
Index: t/lib/TestAPRlib/finfo.pm
===================================================================
--- t/lib/TestAPRlib/finfo.pm (revision 29)
+++ t/lib/TestAPRlib/finfo.pm (revision 30)
@@ -144,7 +144,7 @@
ok t_cmp($finfo->protection & APR::Const::FPROT_WREAD,
$stat->{protection} & S_IROTH,
'$finfo->protection() & APR::Const::FPROT_WREAD');
- }
+ }
if (WIN32 and APACHE_2_2_PLUS) {
skip "broken apr stat on Win32", 0;
}
@@ -152,7 +152,7 @@
ok t_cmp($finfo->protection & APR::Const::FPROT_WWRITE,
$stat->{protection} & S_IWOTH,
'$finfo->protection() & APR::Const::FPROT_WWRITE');
- }
+ }
if (WIN32) {
skip "different file semantics", 0;
}
Index: lib/ModPerl/WrapXS.pm
===================================================================
--- lib/ModPerl/WrapXS.pm (revision 29)
+++ lib/ModPerl/WrapXS.pm (revision 30)
@@ -289,7 +289,7 @@
EOF
}
elsif ($access_mode eq 'rw_char_undef') {
- my $pool = $e->{pool}
+ my $pool = $e->{pool}
or die "rw_char_undef accessors need pool";
$pool .= '(obj)';
# XXX: not sure where val=$default is coming from, but for now use
@@ -778,7 +778,7 @@
my $objects;
sub _get_modules {
- for my $method (sort keys %$methods) {
+ for my $method (sort keys %$methods) {
for my $item ( @{ $methods->{$method} }) {
push @{ $modules->{$item->[MODULE]} }, [$method, $item->[OBJECT]];
}
@@ -786,7 +786,7 @@
}
sub _get_objects {
- for my $method (sort keys %$methods) {
+ for my $method (sort keys %$methods) {
for my $item ( @{ $methods->{$method} }) {
next unless defined $item->[OBJECT];
push @{ $objects->{$item->[OBJECT]} }, [$method, $item->[MODULE]];
@@ -945,7 +945,7 @@
my @args = @_ ? @_ : @ARGV;
while (@args) {
my $method = shift @args;
- my $object = (@args &&
+ my $object = (@args &&
(ref($args[0]) || $args[0] =~ /^(Apache2|ModPerl|APR)/))
? shift @args
: undef;
@@ -1065,7 +1065,7 @@
my $format = "%-${max_len}s %s\n";
my $banner = sprintf($format, "Method", "Invoked on object type");
my $hint = join '',
- ("\nModule '$module' contains the following XS methods:\n\n",
+ ("\nModule '$module' contains the following XS methods:\n\n",
$banner, sep(length($banner)),
map( { sprintf $format, $_->[0], $_->[1]||'???'}
@{ $modules->{$module} }),
@@ -1225,10 +1225,10 @@
if (my $attr = $entry->{attr}) {
return 1 if grep { $_ eq 'static' } @$attr;
}
-
+
#C::Scan doesnt always pickup static __inline__
return 1 if $entry->{name} =~ /^mpxs_/o;
-
+
return 0;
}
@@ -1297,7 +1297,7 @@
while (my ($key, $table) = each %files) {
my $handles = $self->open_export_files($key, $ext);
- my %seen; #only write header once if this is a single file
+ my %seen; #only write header once if this is a single file
for my $fh (values %$handles) {
next if $seen{$fh}++;
print $fh $self->$header();
@@ -1356,14 +1356,14 @@
EOF
return;
}
-
+
print $fh <<"EOF";
-/*
+/*
* This is indeed a ugly hack!
* See also src/modules/perl/mod_perl.c for modperl_ugly_hack
* If we don't build such a list of exported API functions, the over-zealous
* linker can and will remove the unused functions completely. In order to
- * avoid this, we create this object and modperl_ugly_hack to create a
+ * avoid this, we create this object and modperl_ugly_hack to create a
* dependency between all the exported API and mod_perl.c
*/
const void *modperl_ugly_hack = NULL;
Index: lib/ModPerl/Config.pm
===================================================================
--- lib/ModPerl/Config.pm (revision 29)
+++ lib/ModPerl/Config.pm (revision 30)
@@ -56,7 +56,7 @@
$cfg .= qx{$command};
$cfg .= Apache::TestConfig::ldd_as_string($httpd);
- }
+ }
else {
$cfg .= "\n\n*** The httpd binary was not found\n";
}
Index: lib/ModPerl/Manifest.pm
===================================================================
--- lib/ModPerl/Manifest.pm (revision 29)
+++ lib/ModPerl/Manifest.pm (revision 30)
@@ -40,7 +40,7 @@
my @files;
my $cwd = Cwd::cwd();
- my @lines = `svn status -v` ;
+ my @lines = `svn status -v` ;
foreach my $line (@lines) {
chomp $line;
if ($line =~ /(?:\d+)\s+(?:\d+)\s+(?:\w+)\s+(.*)\s*/) {
Index: lib/ModPerl/CScan.pm
===================================================================
--- lib/ModPerl/CScan.pm (revision 29)
+++ lib/ModPerl/CScan.pm (revision 30)
@@ -8,7 +8,7 @@
# it's not a requirement for mod_perl users
use Data::Flow qw(0.05);
-use strict; # Earlier it catches ISA and EXPORT.
+use strict; # Earlier it catches ISA and EXPORT.
@ModPerl::CScan::ISA = qw(Exporter Data::Flow);
@@ -17,9 +17,9 @@
# Do not simply export all your public functions/methods/constants.
@ModPerl::CScan::EXPORT = qw(
- );
+ );
@ModPerl::CScan::EXPORT_OK = qw(
- );
+ );
# this flag tells cpp to only output macros
$ModPerl::CScan::MACROS_ONLY = '-dM';
@@ -38,8 +38,8 @@
for (qw(__func__ _Complex _Imaginary _Bool inline restrict)) {
$style_keywords{'C9X'}{$_}++;
}
-for (qw(inline const asm noreturn section
- constructor destructor unused weak)) {
+for (qw(inline const asm noreturn section
+ constructor destructor unused weak)) {
$style_keywords{'GNU'}{$_}++;
$style_keywords{'GNU'}{"__$ {_}__"}++;
}
@@ -57,37 +57,37 @@
c_styles => { default => [qw(C++ GNU C9X)] },
add_cppflags => { default => '' },
keywords => { prerequisites => ['c_styles'],
- output => sub {
- my %kw = %keywords;
- my %add;
- for ( @{ shift->{c_styles} } ) {
- %add = %{ $style_keywords{$_} };
- %kw = (%kw, %add);
- }
- \%kw;
- }, },
+ output => sub {
+ my %kw = %keywords;
+ my %add;
+ for ( @{ shift->{c_styles} } ) {
+ %add = %{ $style_keywords{$_} };
+ %kw = (%kw, %add);
+ }
+ \%kw;
+ }, },
'undef' => { default => undef },
filename_filter => { default => undef },
full_text => { class_filter => [ 'text', 'C::Preprocessed',
- qw(undef filename Defines includeDirs Cpp)] },
+ qw(undef filename Defines includeDirs Cpp)] },
text => { class_filter => [ 'text', 'C::Preprocessed',
- qw(filename_filter filename Defines includeDirs Cpp)] },
+ qw(filename_filter filename Defines includeDirs Cpp)] },
text_only_from => { class_filter => [ 'text_only_from', 'C::Preprocessed',
- qw(filename_filter filename Defines includeDirs Cpp)] },
- includes => { filter => [ \&includes,
- qw(filename Defines includeDirs Cpp) ], },
- includeDirs => { prerequisites => ['filedir'],
- output => sub {
- my $data = shift;
- [ $data->{filedir}, '/usr/local/include', '.'];
- } },
- Cpp => { prerequisites => [qw(cppminus add_cppflags cppflags cppstdin)],
- output => sub {
- my $data = shift;
- return { cppstdin => $data->{cppstdin},
- cppflags => "$data->{cppflags} $data->{add_cppflags}",
- cppminus => $data->{cppminus} };
- } },
+ qw(filename_filter filename Defines includeDirs Cpp)] },
+ includes => { filter => [ \&includes,
+ qw(filename Defines includeDirs Cpp) ], },
+ includeDirs => { prerequisites => ['filedir'],
+ output => sub {
+ my $data = shift;
+ [ $data->{filedir}, '/usr/local/include', '.'];
+ } },
+ Cpp => { prerequisites => [qw(cppminus add_cppflags cppflags cppstdin)],
+ output => sub {
+ my $data = shift;
+ return { cppstdin => $data->{cppstdin},
+ cppflags => "$data->{cppflags} $data->{add_cppflags}",
+ cppminus => $data->{cppminus} };
+ } },
filedir => { output => sub { dirname ( shift->{filename} || '.' ) } },
sanitized => { filter => [ \&sanitize, 'text'], },
toplevel => { filter => [ \&top_level, 'sanitized'], },
@@ -97,30 +97,30 @@
typedef_chunks => { filter => [ \&typedef_chunks, 'full_toplevel'], },
struct_chunks => { filter => [ \&struct_chunks, 'full_toplevel'], },
typedefs_whited => { filter => [ \&typedefs_whited,
- 'full_sanitized', 'typedef_chunks',
- 'keywords_rex'], },
+ 'full_sanitized', 'typedef_chunks',
+ 'keywords_rex'], },
typedef_texts => { filter => [ \&typedef_texts,
- 'full_text', 'typedef_chunks'], },
+ 'full_text', 'typedef_chunks'], },
struct_texts => { filter => [ \&typedef_texts,
- 'full_text', 'struct_chunks'], },
+ 'full_text', 'struct_chunks'], },
typedef_hash => { filter => [ \&typedef_hash,
- 'typedef_texts', 'typedefs_whited'], },
+ 'typedef_texts', 'typedefs_whited'], },
typedef_structs => { filter => [ \&typedef_structs,
- 'typedef_hash', 'struct_texts'], },
+ 'typedef_hash', 'struct_texts'], },
typedefs_maybe => { filter => [ sub {[keys %{+shift}]},
- 'typedef_hash'], },
+ 'typedef_hash'], },
defines_maybe => { filter => [ \&defines_maybe, 'filename'], },
defines_no_args => { prerequisites => ['defines_maybe'],
- output => sub { shift->{defines_maybe}->[0] }, },
+ output => sub { shift->{defines_maybe}->[0] }, },
defines_args => { prerequisites => ['defines_maybe'],
- output => sub { shift->{defines_maybe}->[1] }, },
+ output => sub { shift->{defines_maybe}->[1] }, },
- defines_full => { filter => [ \&defines_full,
- qw(filename Defines includeDirs Cpp) ], },
+ defines_full => { filter => [ \&defines_full,
+ qw(filename Defines includeDirs Cpp) ], },
defines_no_args_full => { prerequisites => ['defines_full'],
- output => sub { shift->{defines_full}->[0] }, },
+ output => sub { shift->{defines_full}->[0] }, },
defines_args_full => { prerequisites => ['defines_full'],
- output => sub { shift->{defines_full}->[1] }, },
+ output => sub { shift->{defines_full}->[1] }, },
decl_inlines => { filter => [ \&functions_in, 'no_type_decl'], },
inline_chunks => { filter => [ sub { shift->[0] }, 'decl_inlines'], },
@@ -134,13 +134,13 @@
vdecl_chunks => { filter => [ sub { shift->[3] }, 'decl_inlines'], },
vdecls => { filter => [ \&from_chunks, 'vdecl_chunks', 'text'], },
vdecl_hash => { filter => [ \&vdecl_hash, 'vdecls', 'mdecls' ], },
- parsed_fdecls => { filter => [ \&do_declarations, 'fdecls',
- 'typedef_hash', 'keywords'], },
+ parsed_fdecls => { filter => [ \&do_declarations, 'fdecls',
+ 'typedef_hash', 'keywords'], },
keywords_rex => { filter => [ sub { my @k = keys %{ shift() };
- local $" = '|';
- my $r = "(?:@k)";
- eval 'qr/$r/' or $r # Older Perls
- }, 'keywords'], },
+ local $" = '|';
+ my $r = "(?:@k)";
+ eval 'qr/$r/' or $r # Older Perls
+ }, 'keywords'], },
};
sub from_chunks {
@@ -164,11 +164,11 @@
or die "Cannot open pipe from cppstdin: $!\n";
while (<$stream>) {
- next unless m(^\s*\#\s* # Leading hash
- (line\s*)? # 1: Optional line
- ([0-9]+)\s* # 2: Line number
- (.*) # 3: The rest
- )x;
+ next unless m(^\s*\#\s* # Leading hash
+ (line\s*)? # 1: Optional line
+ ([0-9]+)\s* # 2: Line number
+ (.*) # 3: The rest
+ )x;
my $include = $3;
$include = $1 if $include =~ /"(.*)"/; # Filename may be in quotes
$include =~ s,\\\\,/,g if $^O eq 'os2';
@@ -182,19 +182,19 @@
my ($mline,$line,%macros,%macrosargs,$sym,$args);
open(C, $file) or die "Cannot open file $file: $!\n";
while (not eof(C) and $line = <C>) {
- next unless
+ next unless
( $line =~ s[
- ^ \s* \# \s* # Start of directive
- define \s+
- (\w+) # 1: symbol
- (?:
- \( (.*?) \s* \) # 2: Minimal match for arguments
+ ^ \s* \# \s* # Start of directive
+ define \s+
+ (\w+) # 1: symbol
+ (?:
+ \( (.*?) \s* \) # 2: Minimal match for arguments
# in parenths (without trailing
# spaces)
- )? # optional, no grouping
- \s* # rest is the definition
- ([\s\S]*) # 3: the rest
- ][]x );
+ )? # optional, no grouping
+ \s* # rest is the definition
+ ([\s\S]*) # 3: the rest
+ ][]x );
($sym, $args, $mline) = ($1, $2, $3);
$mline .= <C> while not eof(C) and $mline =~ s/\\\n/\n/;
chomp $mline;
@@ -221,19 +221,19 @@
or die "Cannot open pipe from cppstdin: $!\n";
while (defined ($line = <$stream>)) {
- next unless
+ next unless
( $line =~ s[
- ^ \s* \# \s* # Start of directive
- define \s+
- (\w+) # 1: symbol
- (?:
- \( (.*?) \s* \) # 2: Minimal match for arguments
+ ^ \s* \# \s* # Start of directive
+ define \s+
+ (\w+) # 1: symbol
+ (?:
+ \( (.*?) \s* \) # 2: Minimal match for arguments
# in parenths (without trailing
# spaces)
- )? # optional, no grouping
- \s* # rest is the definition
- ([\s\S]*) # 3: the rest
- ][]x );
+ )? # optional, no grouping
+ \s* # rest is the definition
+ ([\s\S]*) # 3: the rest
+ ][]x );
($sym, $args, $mline) = ($1, $2, $3);
$mline .= <$stream> while ($mline =~ s/\\\n/\n/);
chomp $mline;
@@ -249,7 +249,7 @@
[\%macros, \%macrosargs];
}
-sub typedef_chunks { # Input is toplevel, output: starts and ends
+sub typedef_chunks { # Input is toplevel, output: starts and ends
my $txt = shift;
pos $txt = 0;
my ($b, $e, @out);
@@ -273,7 +273,7 @@
[EMAIL PROTECTED];
}
-sub typedefs_whited { # Input is sanitized text, and list of beg/end.
+sub typedefs_whited { # Input is sanitized text, and list of beg/end.
my @lst = @{$_[1]};
my @out;
my ($b, $e);
@@ -325,35 +325,35 @@
$wh =~ /,/g;
my $p = pos $wh;
my ($s, $e);
- if (matchingbrace($wh)) { # Inside. Easy part: just split on /,/...
- $e = pos($wh) - 1;
- $s = $e;
- my $d = 0;
- # Skip back
- while (--$s >= 0) {
- my $c = substr $wh, $s, 1;
- if ($c =~ /[\(\{\[]/) {
- $d--;
- } elsif ($c =~ /[\)\]\}]/) {
- $d++;
- }
- last if $d < 0;
- }
- if ($s < 0) { # Should not happen
- warn("panic: could not match braces in\n\t$td\nwhited as\n\t$wh\n");
- next loop;
- }
- $s++;
- } else { # We are at toplevel
- # We need to skip back all the modifiers attached to the first thingy
- # Guesstimates: everything after the first '*' (inclusive)
- pos $wh = 0;
- $wh = /(?=\w)/g;
- my $ws = pos $wh;
- my $pre = substr $wh, 0, $ws;
- $s = $ws;
- $s = pos $pre if $pre =~ /(?=\*)/g;
- $e = length $wh;
+ if (matchingbrace($wh)) { # Inside. Easy part: just split on /,/...
+ $e = pos($wh) - 1;
+ $s = $e;
+ my $d = 0;
+ # Skip back
+ while (--$s >= 0) {
+ my $c = substr $wh, $s, 1;
+ if ($c =~ /[\(\{\[]/) {
+ $d--;
+ } elsif ($c =~ /[\)\]\}]/) {
+ $d++;
+ }
+ last if $d < 0;
+ }
+ if ($s < 0) { # Should not happen
+ warn("panic: could not match braces in\n\t$td\nwhited as\n\t$wh\n");
+ next loop;
+ }
+ $s++;
+ } else { # We are at toplevel
+ # We need to skip back all the modifiers attached to the first thingy
+ # Guesstimates: everything after the first '*' (inclusive)
+ pos $wh = 0;
+ $wh = /(?=\w)/g;
+ my $ws = pos $wh;
+ my $pre = substr $wh, 0, $ws;
+ $s = $ws;
+ $s = pos $pre if $pre =~ /(?=\*)/g;
+ $e = length $wh;
}
# Now: need to split $td based on commas in $wh!
# And need to split each chunk of $td based on word in the chunk of $wh!
@@ -364,29 +364,29 @@
my $td_s = 0;
my (@td_decl, @td_pre, @td_post, @td_word);
for my $wh_d (@wh_decls) {
- my $td_d = substr $td, $td_s, length $wh_d;
- push @td_decl, $td_d;
- $wh_d =~ /(\w+)/g;
- push @td_word, $1;
- push @td_post, substr $td_d, pos($wh_d);
- push @td_pre, substr $td_d, pos($wh_d) - length $1, length $1;
- $td_s += 1 + length $wh_d; # Skip over ','
+ my $td_d = substr $td, $td_s, length $wh_d;
+ push @td_decl, $td_d;
+ $wh_d =~ /(\w+)/g;
+ push @td_word, $1;
+ push @td_post, substr $td_d, pos($wh_d);
+ push @td_pre, substr $td_d, pos($wh_d) - length $1, length $1;
+ $td_s += 1 + length $wh_d; # Skip over ','
}
for my $i (0..$#wh_decls) {
- my $p = "$td_post[$i]$post";
- $p = '' unless $p =~ /\S/;
- $out{$td_word[$i]} = ["$pre$td_pre[$i]", $p];
+ my $p = "$td_post[$i]$post";
+ $p = '' unless $p =~ /\S/;
+ $out{$td_word[$i]} = ["$pre$td_pre[$i]", $p];
}
- } elsif ($td =~ /\(\s* \*? \s* ([^)]+) \s* \) \s* \(.*\)/gxs){ # XXX: function pointer typedef
+ } elsif ($td =~ /\(\s* \*? \s* ([^)]+) \s* \) \s* \(.*\)/gxs){ # XXX: function pointer typedef
$out{$1} = ['XXX: pre_foo', 'XXX: post_bar']; # XXX: not sure what to stuff here
#warn "[$1] [$td]" if $verb;
- } else { # Only one thing defined...
+ } else { # Only one thing defined...
$wh =~ /(\w+)/g;
- my $e = pos $wh;
- my $s = $e - length $1;
- my $type = $1;
- my $pre = substr $td, 0, $s;
- my $post = substr $td, $e, length($td) - $e;
+ my $e = pos $wh;
+ my $s = $e - length $1;
+ my $type = $1;
+ my $pre = substr $td, 0, $s;
+ my $post = substr $td, $e, length($td) - $e;
$post = '' unless $post =~ /\S/;
$out{$type} = [$pre, $post];
}
@@ -459,18 +459,18 @@
$word = $1;
if ($word eq ';' || $word eq '') {
next unless defined $id;
- $type = 'int' unless defined $type; # or is this an error?
+ $type = 'int' unless defined $type; # or is this an error?
push @$vars, [ $type, $post, $id ];
($type, $post, $id, $func) = (undef, undef, undef);
} elsif ($word eq ',') {
warn "panic: expecting name before comma in '$in'\n" unless defined $id;
- $type = 'int' unless defined $type; # or is this an error?
+ $type = 'int' unless defined $type; # or is this an error?
push @$vars, [ $type, $post, $id ];
$type =~ s/[ *]*$//;
$id = undef;
} elsif ($word eq '[') {
warn "panic: expecting name before '[' in '$in'\n" unless defined $id;
- $type = 'int' unless defined $type; # or is this an error?
+ $type = 'int' unless defined $type; # or is this an error?
my $b = pos $in;
matchingbrace($in);
$post .= $word . substr $in, $b, pos($in) - $b;
@@ -479,15 +479,15 @@
$type = join ' ', grep defined, $type, $id if defined $id;
$type = 'int' unless defined $type;
if ($in =~ /\G\s*(\*[\s\*]*?)\s*(\w+)[\[\]\d\s]*(\)\s*\()/gc) {
- $type .= "($1";
- $id = $2;
- $post = $3;
- my $b = pos $in;
- matchingbrace($in);
- $post .= substr $in, $b, pos($in) - $b;
+ $type .= "($1";
+ $id = $2;
+ $post = $3;
+ my $b = pos $in;
+ matchingbrace($in);
+ $post .= substr $in, $b, pos($in) - $b;
} else {
- warn "panic: can't parse function pointer declaration in '$in'\n";
- return;
+ warn "panic: can't parse function pointer declaration in '$in'\n";
+ return;
}
} elsif ($word =~ /^:/) {
# bitfield
@@ -495,14 +495,14 @@
$post .= $word;
} else {
if (defined $post) {
- if ($func) {
- $post .= $word;
- } else {
- warn "panic: not expecting '$word' after array bounds in '$in'\n";
- }
+ if ($func) {
+ $post .= $word;
+ } else {
+ warn "panic: not expecting '$word' after array bounds in '$in'\n";
+ }
} else {
- $type = join ' ', grep defined, $type, $id if defined $id;
- $id = $word;
+ $type = join ' ', grep defined, $type, $id if defined $id;
+ $id = $word;
}
}
}
@@ -517,7 +517,7 @@
my ($vdecls, $mdecls) = @_;
my %vdecl_hash;
for (@$vdecls, @$mdecls) {
- next if /[()]/; # ignore functions, and function pointers
+ next if /[()]/; # ignore functions, and function pointers
my $copy = $_;
next unless $copy =~ s/^\s*extern\s*//;
my $vars = parse_vars($copy);
@@ -529,8 +529,8 @@
# The output is the list of list of inline chunks and list of
# declaration chunks.
-sub functions_in { # The arg is text without type declarations.
- my $in = shift; # remove_type_decl(top_level(sanitize($txt)));
+sub functions_in { # The arg is text without type declarations.
+ my $in = shift; # remove_type_decl(top_level(sanitize($txt)));
# What remains now consists of variable and function declarations,
# and inline functions.
$in =~ /(?=\S)/g;
@@ -542,7 +542,7 @@
$e = pos $in;
$chunk = substr $in, $b, $e - $b;
# Now subdivide the chunk.
- #
+ #
# What we got is one chunk, probably finished by `;'. Whoever, it
# may start with several inline functions.
#
@@ -552,39 +552,39 @@
$e1 = pos $chunk;
push @inlines, $b + $b1, $b + $e1;
$chunk =~ /(?=\S)/g;
- $b1 = pos $chunk;
+ $b1 = pos $chunk;
$b1 = length $chunk, last unless defined $b1;
}
if ($e - $b - $b1 > 0) {
my ($isvar, $isfunc) = (1, 1);
substr ($chunk, 0, $b1) = '';
- if ($chunk =~ /,/) { # Contains multiple declarations.
- push @mdecls, $b + $b1, $e;
- } else { # Non-multiple.
- # Since leading \s* is not optimized, this is quadratic!
- $chunk =~ s{
- ( ( const | __const
- | __attribute__ \s* \( \s* \)
- ) \s* )* ( ; \s* )? \Z # Strip from the end
- }()x;
- $chunk =~ s/\s*\Z//;
- if ($chunk =~ /\)\Z/) { # Function declaration ends on ")"!
- if ($chunk !~ m{
- \( .* \( # Multiple parenths
- }x
- and $chunk =~ / \w \s* \( /x) { # Most probably pointer to a function?
- $isvar = 0;
- }
- } elsif ($chunk =~ /
- ^ \s* (enum|struct|union|class) \s+ \w+ \s* $
- /x) {
- $isvar = $isfunc = 0;
- }
- if ($isvar) { # Heuristically variable
- push @vdecls, $b + $b1, $e;
- } elsif ($isfunc) {
- push @fdecls, $b + $b1, $e;
- }
+ if ($chunk =~ /,/) { # Contains multiple declarations.
+ push @mdecls, $b + $b1, $e;
+ } else { # Non-multiple.
+ # Since leading \s* is not optimized, this is quadratic!
+ $chunk =~ s{
+ ( ( const | __const
+ | __attribute__ \s* \( \s* \)
+ ) \s* )* ( ; \s* )? \Z # Strip from the end
+ }()x;
+ $chunk =~ s/\s*\Z//;
+ if ($chunk =~ /\)\Z/) { # Function declaration ends on ")"!
+ if ($chunk !~ m{
+ \( .* \( # Multiple parenths
+ }x
+ and $chunk =~ / \w \s* \( /x) { # Most probably pointer to a function?
+ $isvar = 0;
+ }
+ } elsif ($chunk =~ /
+ ^ \s* (enum|struct|union|class) \s+ \w+ \s* $
+ /x) {
+ $isvar = $isfunc = 0;
+ }
+ if ($isvar) { # Heuristically variable
+ push @vdecls, $b + $b1, $e;
+ } elsif ($isfunc) {
+ push @fdecls, $b + $b1, $e;
+ }
}
push @decls, $b + $b1, $e if $isvar || $isfunc;
}
@@ -602,15 +602,15 @@
# Remove function arguments using heuristics methods.
# Now out of several words in a row the last one is a newly defined type.
-sub whited_decl { # Input is sanitized.
+sub whited_decl { # Input is sanitized.
my $keywords_rex = shift;
- my $in = shift; # Text of a declaration
+ my $in = shift; # Text of a declaration
#typedef ret_type*(*func) -> typedef ret_type* (*func)
$in =~ s/\*\(\*/* \(*/;
my $rest = $in;
- my $out = $in; # Whited out $in
+ my $out = $in; # Whited out $in
# Remove all the structs
while ($out =~ /(\b(struct|union|class|enum)(\s+\w+)?\s*\{)/g) {
@@ -619,7 +619,7 @@
matchingbrace($out);
my $pos_end = pos $out;
substr($out, $pos_start, $pos_end - $pos_start) =
- ' ' x ($pos_end - $pos_start);
+ ' ' x ($pos_end - $pos_start);
pos $out = $pos_end;
}
@@ -635,7 +635,7 @@
# Remove the __attribute__ tag.
substr($out, $att_pos_start, $att_pos_end - $att_pos_start) =
- ' ' x ($att_pos_end - $att_pos_start);
+ ' ' x ($att_pos_end - $att_pos_start);
pos $out = $att_pos_end;
}
@@ -694,7 +694,7 @@
return 1 if $n < 0;
}
# pos($_[0]) is after the closing brace now
- return; # false
+ return; # false
}
sub remove_Comments_no_Strings { # We expect that no strings are around
@@ -704,30 +704,30 @@
$in;
}
-sub sanitize { # We expect that no strings are around
+sub sanitize { # We expect that no strings are around
my $in = shift;
# C and C++, strings and characters
$in =~ s{ / (
- / .* # C++ style
- |
- \* [\s\S]*? \*/ # C style
- ) # (1)
- | '((?:[^\\\']|\\.)+)' # (2) Character constants
- | "((?:[^\\\"]|\\.)*)" # (3) Strings
- | ( ^ \s* \# .* # (4) Preprocessor
- ( \\ $ \n .* )* ) # and continuation lines
- } {
- # We want to preserve the length, so that one may go back
- defined $1 ? ' ' x (1 + length $1) :
- defined $4 ? ' ' x length $4 :
- defined $2 ? "'" . ' ' x length($2) . "'" :
- defined $3 ? '"' . ' ' x length($3) . '"' : '???'
- }xgem ;
+ / .* # C++ style
+ |
+ \* [\s\S]*? \*/ # C style
+ ) # (1)
+ | '((?:[^\\\']|\\.)+)' # (2) Character constants
+ | "((?:[^\\\"]|\\.)*)" # (3) Strings
+ | ( ^ \s* \# .* # (4) Preprocessor
+ ( \\ $ \n .* )* ) # and continuation lines
+ } {
+ # We want to preserve the length, so that one may go back
+ defined $1 ? ' ' x (1 + length $1) :
+ defined $4 ? ' ' x length $4 :
+ defined $2 ? "'" . ' ' x length($2) . "'" :
+ defined $3 ? '"' . ' ' x length($3) . '"' : '???'
+ }xgem ;
die "Unfinished comment" if $in =~ m{ /\* }x;
$in;
}
-sub top_level { # We expect argument is sanitized
+sub top_level { # We expect argument is sanitized
# Note that this may remove the variable in declaration: int (*func)();
my $in = shift;
my $start;
@@ -735,18 +735,18 @@
while ($in =~ /[\[\{\(]/g ) {
$start = pos $in;
matchingbrace($in);
- substr($out, $start, pos($in) - 1 - $start)
+ substr($out, $start, pos($in) - 1 - $start)
= ' ' x (pos($in) - 1 - $start);
}
$out;
}
-sub remove_type_decl { # We suppose that the arg is top-level only.
+sub remove_type_decl { # We suppose that the arg is top-level only.
my $in = shift;
$in =~ s/(\b__extension__)(\s+typedef\b)/(' ' x length $1) . $2/gse;
$in =~ s/(\btypedef\b.*?;)/' ' x length $1/gse;
# The following form may appear only in the declaration of the type itself:
- $in =~
+ $in =~
s/(\b(enum|struct|union|class)\b[\s\w]*\{\s*\}\s*;)/' ' x length $1/gse;
$in;
}
@@ -830,10 +830,10 @@
my $p = 0;
my $arg;
while ($top =~ /,/g) {
- $arg = substr($argstring, $p, pos($top) - 1 - $p);
- $arg =~ s/^\s+|\s+$//gs;
- push @args, $arg;
- $p = pos $top;
+ $arg = substr($argstring, $p, pos($top) - 1 - $p);
+ $arg =~ s/^\s+|\s+$//gs;
+ push @args, $arg;
+ $p = pos $top;
}
$arg = substr $argstring, $p;
$arg =~ s/^\s+|\s+$//gs;
@@ -877,7 +877,7 @@
$ident = "arg$argnum";
}
} else {
- die "Cannot process declaration `$decl' without an identifier"
+ die "Cannot process declaration `$decl' without an identifier"
unless $decl =~ /\G(\w+)/g;
$ident = $1;
$pos = pos $decl;
@@ -904,10 +904,10 @@
my $p = 0;
my $arg;
while ($top =~ /,/g) {
- $arg = substr($argstring, $p, pos($top) - 1 - $p);
- $arg =~ s/^\s+|\s+$//gs;
- push @args, $arg;
- $p = pos $top;
+ $arg = substr($argstring, $p, pos($top) - 1 - $p);
+ $arg =~ s/^\s+|\s+$//gs;
+ push @args, $arg;
+ $p = pos $top;
}
$arg = substr $argstring, $p;
$arg =~ s/^\s+|\s+$//gs;
@@ -930,9 +930,9 @@
use constant WIN32 => $^O eq 'MSWin32';
sub new {
- die "usage: C::Preprocessed->new(filename[, defines[, includes[, cpp]]])"
+ die "usage: C::Preprocessed->new(filename[, defines[, includes[, cpp]]])"
if @_ < 2 or @_ > 5;
- my ($class, $filename, $Defines, $Includes, $Cpp)
+ my ($class, $filename, $Defines, $Includes, $Cpp)
= (shift, shift, shift, shift, shift);
$Cpp ||= \%Config::Config;
my $filedir = dirname $filename || '.';
@@ -980,7 +980,7 @@
}
sub DESTROY {
- close($_[0])
+ close($_[0])
or die "Cannot close pipe from `$Config::Config{cppstdin}': err $?, $!\n";
}
Index: lib/ModPerl/BuildMM.pm
===================================================================
--- lib/ModPerl/BuildMM.pm (revision 29)
+++ lib/ModPerl/BuildMM.pm (revision 30)
@@ -267,7 +267,7 @@
my $podpath = catfile $doc_root, $pod;
next unless -r $podpath;
- push @target,
+ push @target,
'$(FULLPERL) -I$(INST_LIB) ' .
"-I$apache_test_dir -MModPerl::BuildMM " .
"-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
Index: lib/ModPerl/Code.pm
===================================================================
--- lib/ModPerl/Code.pm (revision 29)
+++ lib/ModPerl/Code.pm (revision 30)
@@ -68,7 +68,7 @@
},
PerSrv => {
ret => 'int',
- args => [{type => 'request_rec', name => 'r'},
+ args => [{type => 'request_rec', name => 'r'},
{type => 'dummy', name => 'MP_HOOK_RUN_ALL'}],
},
Connection => {
@@ -140,7 +140,7 @@
Srv => ['NONE', @ithread_opts, qw(ENABLE AUTOLOAD MERGE_HANDLERS),
@hook_flags, 'UNSET','INHERIT_SWITCHES'],
Dir => [qw(NONE PARSE_HEADERS SETUP_ENV MERGE_HANDLERS GLOBAL_REQUEST UNSET)],
- Req => [qw(NONE SET_GLOBAL_REQUEST PARSE_HEADERS SETUP_ENV
+ Req => [qw(NONE SET_GLOBAL_REQUEST PARSE_HEADERS SETUP_ENV
CLEANUP_REGISTERED PERL_SET_ENV_DIR PERL_SET_ENV_SRV)],
Interp => [qw(NONE IN_USE CLONED BASE)],
Handler => [qw(NONE PARSED METHOD OBJECT ANON AUTOLOAD DYNAMIC FAKE)],
@@ -451,7 +451,7 @@
for (keys %lookup) {
if (/^(\w)/) {
my $gap = " " x ($max_len - length $_);
- push @{ $switch{$1} },
+ push @{ $switch{$1} },
qq{if (strEQ(str, "$_"))$gap return $lookup{$_};};
}
}
@@ -468,7 +468,7 @@
}
delete $dumper{None}; #NONE
- print $h_fh join ' \\'."\n",
+ print $h_fh join ' \\'."\n",
"#define ${class}_dump_flags(p, str)",
qq{modperl_trace(NULL, "$class flags dump (%s):", str);},
map $dumper{$_}, sort keys %dumper;
@@ -552,7 +552,7 @@
$i += $i;
}
- print $h_fh join ' \\'."\n",
+ print $h_fh join ' \\'."\n",
'#define MP_TRACE_dump_flags()',
qq{modperl_trace(NULL, "mod_perl trace flags dump:");},
@dumper;
@@ -785,7 +785,7 @@
# Fix this by cleaning the @Extensions array.
# Loads @Extensions if not loaded
- ExtUtils::Embed::static_ext();
+ ExtUtils::Embed::static_ext();
@ExtUtils::Embed::Extensions = grep{$_} @ExtUtils::Embed::Extensions;
@@ -820,9 +820,9 @@
#backwards compat with older httpd/apr
#XXX: remove once we require newer httpd/apr
-my %ifdef = map { $_, 1 }
+my %ifdef = map { $_, 1 }
qw(APLOG_TOCLIENT APR_LIMIT_NOFILE), # added in ???
- qw(AP_MPMQ_STARTING AP_MPMQ_RUNNING AP_MPMQ_STOPPING
+ qw(AP_MPMQ_STARTING AP_MPMQ_RUNNING AP_MPMQ_STOPPING
AP_MPMQ_MPM_STATE), # added in 2.0.49
qw(APR_FPROT_USETID APR_FPROT_GSETID
APR_FPROT_WSTICKY APR_FOPEN_LARGEFILE); # added in 2.0.50?
@@ -887,7 +887,7 @@
if (strEQ(name, "$name")) {
EOF
- if ($name eq 'DECLINE_CMD' ||
+ if ($name eq 'DECLINE_CMD' ||
$name eq 'DIR_MAGIC_TYPE' ||
$name eq 'CRLF') {
print $c_fh <<EOF;
@@ -941,9 +941,9 @@
$class = canon_lc(lc $class);
while (my ($group, $constants) = each %$groups) {
- push @tags, $group;
+ push @tags, $group;
my $name = join '_', 'MP_constants', $class, $group;
- print $c_fh "\nstatic const char *$name [] = { \n",
+ print $c_fh "\nstatic const char *$name [] = { \n",
(map {
my @ifdef = constants_ifdef($_);
s/^($constant_prefixes)_?//o;
@@ -965,12 +965,12 @@
print $c_fh "\n$proto\n{\n", " switch (*name) {\n";
for my $key (sort keys %switch) {
- my $val = $switch{$key};
- print $c_fh "\tcase '$key':\n";
- for my $group (@$val) {
+ my $val = $switch{$key};
+ print $c_fh "\tcase '$key':\n";
+ for my $group (@$val) {
my $name = join '_', 'MP_constants', $class, $group;
- print $c_fh qq|\tif(strEQ("$group", name))\n\t return $name;\n|;
- }
+ print $c_fh qq|\tif(strEQ("$group", name))\n\t return $name;\n|;
+ }
print $c_fh " break;\n";
}
Index: lib/ModPerl/TestReport.pm
===================================================================
--- lib/ModPerl/TestReport.pm (revision 29)
+++ lib/ModPerl/TestReport.pm (revision 30)
@@ -65,7 +65,7 @@
my @lines = "*** Packages of interest status:\n";
for my $package (sort @interesting_packages) {
- my $vers = exists $packages{$package}
+ my $vers = exists $packages{$package}
? join ", ", sort @{ $packages{$package} }
: "-";
push @lines, sprintf "%-${max_len}s: %s", $package, $vers;
Index: lib/ModPerl/TypeMap.pm
===================================================================
--- lib/ModPerl/TypeMap.pm (revision 29)
+++ lib/ModPerl/TypeMap.pm (revision 30)
@@ -245,7 +245,7 @@
$self->thx_fixup($func);
- my ($status, $failed_type) =
+ my ($status, $failed_type) =
$self->can_map($map, $func->{return_type},
map $_->{type}, @{ $func->{args} });
Index: lib/Apache2/Reload.pm
===================================================================
--- lib/Apache2/Reload.pm (revision 29)
+++ lib/Apache2/Reload.pm (revision 30)
@@ -88,8 +88,8 @@
my $TouchFile = ref($o) && $o->dir_config("ReloadTouchFile");
- my $ConstantRedefineWarnings = ref($o) &&
- (lc($o->dir_config("ReloadConstantRedefineWarnings") || '') eq 'off')
+ my $ConstantRedefineWarnings = ref($o) &&
+ (lc($o->dir_config("ReloadConstantRedefineWarnings") || '') eq 'off')
? 0 : 1;
my $TouchModules;
@@ -109,9 +109,9 @@
}
else {
*Apache2::Reload::INCS = \%INCS;
- my $ExtraList =
- $TouchModules ||
- (ref($o) && $o->dir_config("ReloadModules")) ||
+ my $ExtraList =
+ $TouchModules ||
+ (ref($o) && $o->dir_config("ReloadModules")) ||
'';
my @extra = split /\s+/, $ExtraList;
foreach (@extra) {
@@ -132,7 +132,7 @@
my $ReloadDirs = ref($o) && $o->dir_config("ReloadDirectories");
my @watch_dirs = split(/\s+/, $ReloadDirs||'');
-
+
my @changed;
foreach my $key (sort { $a cmp $b } keys %Apache2::Reload::INCS) {
my $file = $Apache2::Reload::INCS{$key};
@@ -162,13 +162,13 @@
}
$Stat{$file} = $mtime;
}
-
+
#First, let's unload all changed modules
foreach my $module (@changed) {
my $package = module_to_package($module);
ModPerl::Util::unload_package($package);
}
-
+
#Then, let's reload them all, so that module dependencies can satisfy
#themselves in the correct order.
foreach my $module (@changed) {
Index: lib/Apache2/SizeLimit.pm
===================================================================
--- lib/Apache2/SizeLimit.pm (revision 29)
+++ lib/Apache2/SizeLimit.pm (revision 30)
@@ -80,7 +80,7 @@
# Currently unsupported for mp2 because of threads...
# }
# elsif (WIN32) {
-#
+#
# if ( eval { require Win32::API } ) {
# $HOW_BIG_IS_IT = \&win32_size_check;
# }
Index: lib/Apache2/PerlSections.pm
===================================================================
--- lib/Apache2/PerlSections.pm (revision 29)
+++ lib/Apache2/PerlSections.pm (revision 30)
@@ -66,9 +66,9 @@
{
no strict 'refs';
foreach my $package ($self->package) {
- my @config = map { split /\n/ }
- grep { defined }
- (@{"${package}::$special"},
+ my @config = map { split /\n/ }
+ grep { defined }
+ (@{"${package}::$special"},
${"${package}::$special"});
$self->dump_special(@config);
}
@@ -89,7 +89,7 @@
$self->{symbols} = [];
- #XXX: Here would be a good place to warn about NOT using
+ #XXX: Here would be a good place to warn about NOT using
# Apache2::ReadConfig:: directly in <Perl> sections
foreach my $pack ($self->package, $self->SPECIAL_PACKAGE) {
#XXX: Shamelessly borrowed from Devel::Symdump;
Index: lib/Apache2/ParseSource.pm
===================================================================
--- lib/Apache2/ParseSource.pm (revision 29)
+++ lib/Apache2/ParseSource.pm (revision 30)
@@ -79,7 +79,7 @@
# some types c-scan failing to resolve
-push @c_scan_defines, map { "$_=void" }
+push @c_scan_defines, map { "$_=void" }
qw(PPADDR_t PerlExitListEntry modperl_tipool_vtbl_t);
sub scan {
Index: lib/Apache2/Build.pm
===================================================================
--- lib/Apache2/Build.pm (revision 29)
+++ lib/Apache2/Build.pm (revision 30)
@@ -1845,7 +1845,7 @@
if (WIN32) {
(my $manifest = $libs) =~ s/\.lib$/.so.manifest/;
print $fh $self->canon_make_attr('manifest_location', $manifest);
- }
+ }
print $fh $self->canon_make_attr('ap_libdir',
$self->ap_destdir(catdir $self->{MP_AP_PREFIX}, 'lib')
Index: lib/Apache2/porting.pm
===================================================================
--- lib/Apache2/porting.pm (revision 29)
+++ lib/Apache2/porting.pm (revision 30)
@@ -32,7 +32,7 @@
# - removed and replaced methods
# - hinting the package names in which methods reside
-my %avail_methods = map { $_ => 1 }
+my %avail_methods = map { $_ => 1 }
(ModPerl::MethodLookup::avail_methods(),
ModPerl::MethodLookup::avail_methods_compat());
Index: lib/Apache2/Status.pm
===================================================================
--- lib/Apache2/Status.pm (revision 29)
+++ lib/Apache2/Status.pm (revision 30)
@@ -201,7 +201,7 @@
my $uri = $r->uri;
my @retval = (
'<table border="1">',
- "<tr>",
+ "<tr>",
(map "<td><b>$_</b></td>", qw(Package Version Modified File)),
"</tr>\n"
);
@@ -221,8 +221,8 @@
'N/A';
push @retval, (
- "<tr>",
- (map "<td>$_</td>",
+ "<tr>",
+ (map "<td>$_</td>",
qq(<a href="$uri?$module">$module</a>),
$v, $mtime, $INC{$file}),
"</tr>\n"
@@ -243,7 +243,7 @@
foreach my $file (sort keys %INC) {
next if $file =~ m:\.(pm|al|ix)$:;
- push @retval,
+ push @retval,
qq(<tr><td>$file</td><td>$INC{$file}</td></tr>\n);
}
push @retval, "</table>";
@@ -394,14 +394,14 @@
$obj->can('FILEGV') ? $obj->FILEGV->SV->PV : $obj->FILE;
}
-sub status_cv_dump {
+sub status_cv_dump {
my ($r) = @_;
return [] unless has($r, "b");
no strict 'refs';
my ($name, $type) = (split "/", $r->uri)[-2,-1];
# could be another child, which doesn't have this symbol table?
- return unless *$name{CODE};
+ return unless *$name{CODE};
my @retval = "<p>Subroutine info for <b>$name</b></p>\n<pre>\n";
my $obj = B::svref_2object(*$name{CODE});
@@ -409,7 +409,7 @@
my $stash = $obj->GV->STASH->NAME;
my $script = $r->location;
- push @retval, "File: ",
+ push @retval, "File: ",
(-e $file ? qq(<a href="file:$file">$file</a>) : $file), "\n";
my $cv = $obj->GV->CV;
@@ -563,11 +563,11 @@
}
elsif ($name =~ /^\*(\w+)\{(\w+)\}/) {
my $link = qq(<a href="$script/$package\::$1/$2?data_dump">);
- $r->printf("$link%-${nlen}s</a> %${slen}d bytes\n",
+ $r->printf("$link%-${nlen}s</a> %${slen}d bytes\n",
$name, $stats->{size});
}
else {
- my $link =
+ my $link =
qq(<a href="$script/slow/$package\::$name?noh_b_terse_size">);
$r->printf("$link%-${nlen}s</a> %${slen}d bytes | %${clen}d OPs\n",
$name, $stats->{size}, $stats->{count});
@@ -592,7 +592,7 @@
my $name = (split "/", $r->uri)[-1];
$r->print("Deparse of $name\n\n");
- my $deparse = B::Deparse->new(split /\s+/,
+ my $deparse = B::Deparse->new(split /\s+/,
$r->dir_config('StatusDeparseOptions')||"");
my $body = $deparse->coderef2text(\&{$name});
$r->print("sub $name $body");
@@ -615,7 +615,7 @@
my $name = (split "/", $r->uri)[-1];
$r->print("Fathom Score of $name\n\n");
- my $fathom = B::Fathom->new(split /\s+/,
+ my $fathom = B::Fathom->new(split /\s+/,
$r->dir_config('StatusFathomOptions')||"");
$r->print($fathom->fathom(\&{$name}));
}
@@ -772,7 +772,7 @@
my @methods = sort keys %{$self->{'AUTOLOAD'}};
- if ($is_main) {
+ if ($is_main) {
@methods = grep { $_ ne "packages" } @methods;
unshift @methods, "packages";
}
@@ -783,7 +783,7 @@
my @line = ();
for (sort $self->_partdump(uc $type)) {
- s/([\000-\037\177])/ '^' . pack('c', ord($1) ^ 64)/eg;
+ s/([\000-\037\177])/ '^' . pack('c', ord($1) ^ 64)/eg;
if ($type eq "scalars") {
no strict 'refs';
Index: lib/Apache2/compat.pm
===================================================================
--- lib/Apache2/compat.pm (revision 29)
+++ lib/Apache2/compat.pm (revision 30)
@@ -486,18 +486,18 @@
my ($key, $value) = @_;
if (1 == @_) {
- return wantarray()
+ return wantarray()
? ($table->get($key))
: scalar($table->get($key));
}
elsif (2 == @_) {
if (defined $value) {
- return wantarray()
+ return wantarray()
? ($table->set($key, $value))
: scalar($table->set($key, $value));
}
else {
- return wantarray()
+ return wantarray()
? ($table->unset($key))
: scalar($table->unset($key));
}
@@ -513,21 +513,21 @@
sub header_out {
my $r = shift;
- return wantarray()
+ return wantarray()
? ($r->table_get_set(scalar($r->headers_out), @_))
: scalar($r->table_get_set(scalar($r->headers_out), @_));
}
sub header_in {
my $r = shift;
- return wantarray()
+ return wantarray()
? ($r->table_get_set(scalar($r->headers_in), @_))
: scalar($r->table_get_set(scalar($r->headers_in), @_));
}
sub err_header_out {
my $r = shift;
- return wantarray()
+ return wantarray()
? ($r->table_get_set(scalar($r->err_headers_out), @_))
: scalar($r->table_get_set(scalar($r->err_headers_out), @_));
}
Index: ModPerl-Registry/t/conf/modperl_extra_startup.pl
===================================================================
--- ModPerl-Registry/t/conf/modperl_extra_startup.pl (revision 29)
+++ ModPerl-Registry/t/conf/modperl_extra_startup.pl (revision 30)
@@ -31,7 +31,7 @@
# test the scripts pre-loading by using trans sub
{
sub trans {
- my $uri = shift;
+ my $uri = shift;
$uri =~ s|^/registry_bb/|cgi-bin/|;
return Apache2::ServerUtil::server_root_relative($pool, $uri);
}
Index: ModPerl-Registry/t/cgi-bin/perlrun_extload.pl
===================================================================
--- ModPerl-Registry/t/cgi-bin/perlrun_extload.pl (revision 29)
+++ ModPerl-Registry/t/cgi-bin/perlrun_extload.pl (revision 30)
@@ -19,7 +19,7 @@
# original function's prototype doesn't match the aliases prototype.
# see decl_proto()
BEGIN { t_server_log_warn_is_expected()
- if perlrun_decl->can("decl_proto");
+ if perlrun_decl->can("decl_proto");
}
use perlrun_decl;
Index: ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
===================================================================
--- ModPerl-Registry/lib/ModPerl/RegistryCooker.pm (revision 29)
+++ ModPerl-Registry/lib/ModPerl/RegistryCooker.pm (revision 30)
@@ -326,7 +326,7 @@
sub namespace_from_filename {
my $self = shift;
- my ($volume, $dirs, $file) =
+ my ($volume, $dirs, $file) =
File::Spec::Functions::splitpath($self->{FILENAME});
my @dirs = File::Spec::Functions::splitdir($dirs);
return join '_', grep { defined && length } $volume, @dirs, $file;
@@ -341,7 +341,7 @@
? substr($self->{URI}, 0, length($self->{URI}) - length($path_info))
: $self->{URI};
- if ($ModPerl::RegistryCooker::NameWithVirtualHost &&
+ if ($ModPerl::RegistryCooker::NameWithVirtualHost &&
$self->{REQ}->server->is_virtual) {
my $name = $self->{REQ}->get_server_name;
$script_name = join "", $name, $script_name if $name;
@@ -486,7 +486,7 @@
sub should_compile_if_modified {
my $self = shift;
$self->{MTIME} ||= -M $self->{REQ}->my_finfo;
- !($self->is_cached &&
+ !($self->is_cached &&
$self->cache_table->{ $self->{PACKAGE} }{mtime} <= $self->{MTIME});
}
@@ -610,7 +610,7 @@
# dflt: NOP
# desc: chdirs into $dir
# args: $self - registry blessed object
-# $dir - a dir
+# $dir - a dir
# rtrn: nothing (?or success/failure?)
#########################################################################
@@ -670,9 +670,9 @@
ModPerl::Global::special_list_clear( END => $self->{PACKAGE});
{
- # let the code define its own warn and strict level
+ # let the code define its own warn and strict level
no strict;
- no warnings FATAL => 'all'; # because we use FATAL
+ no warnings FATAL => 'all'; # because we use FATAL
eval $$eval;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]