$compress_nullops = 1;
$omit_seq = 1;
}
- } elsif ($opt eq "P") {
+ } elsif ($opt eq "u") {
$arg ||= shift @options;
push @packages, $arg;
} else {
Output (bytecode) assembler source rather than piping it
through the assembler and outputting bytecode.
-=item B<-Ppackage>
+=item B<-upackage>
Stores package in the output.
=head1 EXAMPLES
- perl -MO=Bytecode,-O6,-ofoo.plc,-Pmain foo.pl
+ perl -MO=Bytecode,-O6,-ofoo.plc,-umain foo.pl
- perl -MO=Bytecode,-S,-Pmain foo.pl > foo.S
+ perl -MO=Bytecode,-S,-umain foo.pl > foo.S
assemble foo.S > foo.plc
Note that C<assemble> lives in the C<B> subdirectory of your perl
library directory. The utility called perlcc may also be used to
help make use of this compiler.
- perl -MO=Bytecode,-PFoo,-oFoo.pmc Foo.pm
+ perl -MO=Bytecode,-uFoo,-oFoo.pmc Foo.pm
=head1 BUGS
vprint 1, "Compiling...";
vprint 3, "Calling $command";
- my ($output_r, $error_r) = spawnit($command);
- my @output = @$output_r;
- my @error = @$error_r;
+ my ($output_r, $error_r) = spawnit($command);
- if (@error && $? != 0) {
- die "$0: $Input did not compile, which can't happen:\n@error\n";
+ if (@$error_r && $? != 0) {
+ die "$0: $Input did not compile, which can't happen:\n@$error_r\n";
+ } else {
+ my @error = grep { !/^$Input syntax OK$/o } @$error_r;
+ warn "$0: Unexpected compiler output:\n@error" if @error;
}
-
+
# Write it and leave.
- print OUT @output or die "can't write $Output: $!";
- close OUT or die "can't close $Output: $!";
+ print OUT @$output_r or die "can't write $Output: $!";
+ close OUT or die "can't close $Output: $!";
# wait, how could it be anything but what you see next?
chmod 0777 & ~umask, $Output or die "can't chmod $Output: $!";