CVf_METHOD CVf_LOCKED CVf_LVALUE
PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE PMf_SKIPWHITE
PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED);
-$VERSION = 0.61;
+$VERSION = 0.62;
use strict;
use warnings ();
my(@args) = @_;
return sub {
my $self = B::Deparse->new(@args);
+ # First deparse command-line args
+ if (defined $^I) { # deparse -i
+ print q(BEGIN { $^I = ).cstring($^I).qq(; }\n);
+ }
+ if ($^W) { # deparse -w
+ print qq(BEGIN { \$^W = $^W; }\n);
+ }
+ if ($/ ne "\n" or defined $O::savebackslash) { # deparse -l and -0
+ my $fs = cstring($/) || 'undef';
+ my $bs = cstring($O::savebackslash) || 'undef';
+ print qq(BEGIN { \$/ = $fs; \$\\ = $bs; }\n);
+ }
my @BEGINs = B::begin_av->isa("B::AV") ? B::begin_av->ARRAY : ();
my @INITs = B::init_av->isa("B::AV") ? B::init_av->ARRAY : ();
my @ENDs = B::end_av->isa("B::AV") ? B::end_av->ARRAY : ();
die $compilesub;
}
- local ($\,$",$,) = (undef,' ','');
+ local $savebackslash = $\;
+ local ($\,$",$,) = (undef,' ','');
&$compilesub();
close STDERR if $veryquiet;
$path .= " -MMac::err=unix" if $Is_MacOS;
my $redir = $Is_MacOS ? "" : "2>&1";
-$a = `$^X $path "-MO=Deparse" -anle 1 $redir`;
+$a = `$^X $path "-MO=Deparse" -anlwi.bak -e 1 $redir`;
$a =~ s/(?:# )?-e syntax OK\n//g; # "# " for Mac OS
+$a =~ s/.*possible typo.*\n//; # Remove warning line
$a =~ s{\\340\\242}{\\s} if (ord("\\") == 224); # EBCDIC, cp 1047 or 037
$a =~ s{\\274\\242}{\\s} if (ord("\\") == 188); # $^O eq 'posix-bc'
$b = <<'EOF';
+BEGIN { $^I = ".bak"; }
+BEGIN { $^W = 1; }
+BEGIN { $/ = "\n"; $\ = "\n"; }
LINE: while (defined($_ = <ARGV>)) {
chomp $_;
our(@F) = split(" ", $_, 0);