diff options
author | Larry Wall <lwall@scalpel.netlabs.com> | 1995-11-21 10:01:00 +1200 |
---|---|---|
committer | Larry <lwall@scalpel.netlabs.com> | 1995-11-21 10:01:00 +1200 |
commit | 4633a7c4bad06b471d9310620b7fe8ddd158cccd (patch) | |
tree | 37ebeb26a64f123784fd8fac6243b124767243b0 /lib/AutoSplit.pm | |
parent | 8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f (diff) | |
download | perl-4633a7c4bad06b471d9310620b7fe8ddd158cccd.tar.gz |
5.002 beta 1
If you're adventurous, have a look at
ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz
Many thanks to Andy for doing the integration.
Obviously, if you consult the bugs database, you'll note there are
still plenty of buglets that need fixing, and several enhancements that
I've intended to put in still haven't made it in (Hi, Tim and Ilya).
But I think it'll be pretty stable. And you can start to fiddle around
with prototypes (which are, of course, still totally undocumented).
Packrats, don't worry too much about readvertising this widely.
Nowadays we're on a T1 here, so our bandwidth is okay.
Have the appropriate amount of jollity.
Larry
Diffstat (limited to 'lib/AutoSplit.pm')
-rw-r--r-- | lib/AutoSplit.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index 72f897d1b1..46cf68985a 100644 --- a/lib/AutoSplit.pm +++ b/lib/AutoSplit.pm @@ -56,6 +56,7 @@ sub autosplit_lib_modules{ foreach(@modules){ s#::#/#g; # incase specified as ABC::XYZ + s|\\|/|g; # bug in ksh OS/2 s#^lib/##; # incase specified as lib/*.pm if ($vms && /[:>\]]/) { # may need to convert VMS-style filespecs my ($dir,$name) = (/(.*])(.*)/); @@ -77,6 +78,9 @@ sub autosplit_file{ # where to write output files $autodir = "lib/auto" unless $autodir; + if ($Config{'osname'} eq 'VMS') { + ($autodir = VMS::Filespec::unixpath($autodir)) =~ s#/$##; + } unless (-d $autodir){ local($", @p)="/"; foreach(split(/\//,$autodir)){ @@ -107,7 +111,6 @@ sub autosplit_file{ $package = $1 if (m/^\s*package\s+([\w:]+)\s*;/); ++$autoloader_seen if m/^\s*(use|require)\s+AutoLoader\b/; ++$autoloader_seen if m/\bISA\s*=.*\bAutoLoader\b/; - ++$autoloader_seen if m/^\s*sub\s+AUTOLOAD\b/; last if /^__END__/; } if ($check_for_autoloader && !$autoloader_seen){ @@ -174,14 +177,15 @@ sub autosplit_file{ # For now both of these produce warnings. open(OUT,">/dev/null") || open(OUT,">nla0:"); # avoid 'not opened' warning - my(@subnames); + my(@subnames, %proto); while (<IN>) { if (/^package ([\w:]+)\s*;/) { warn "package $1; in AutoSplit section ignored. Not currently supported."; } - if (/^sub ([\w:]+)/) { + if (/^sub\s+([\w:]+)(\s*\(.*?\))?/) { print OUT "1;\n"; - my($subname) = $1; + my $subname = $1; + $proto{$1} = $2 or ''; if ($subname =~ m/::/){ warn "subs with package names not currently supported in AutoSplit section"; } @@ -229,7 +233,7 @@ sub autosplit_file{ carp "AutoSplit: unable to create timestamp file ($al_idx_file): $!"; print TS "# Index created by AutoSplit for $filename (file acts as timestamp)\n"; print TS "package $package;\n"; - print TS map("sub $_ ;\n", @subnames); + print TS map("sub $_$proto{$_} ;\n", @subnames); print TS "1;\n"; close(TS); |