@@ -255,8 +255,10 @@ sub ExecuteCommand {
255
255
};
256
256
} ;
257
257
258
- print " Macro code run:\n $code \n " =~ s / ^/ #/ gmr
259
- if ($self -> {Opts }-> {DEBUG });
258
+ if ($self -> {Opts }-> {DEBUG }) {
259
+ (my $c = $code ) =~ s / ^/ #/ gm ;
260
+ emit " Macro code run:\n $c \n "
261
+ }
260
262
eval $code ;
261
263
my $err = $@ ; chomp $err ;
262
264
emit ' print ' . $self -> PrepareString( $self -> EndOB() ) . " ;\n " ;
@@ -279,8 +281,10 @@ sub ExecuteCommand {
279
281
$1
280
282
};
281
283
} ;
282
- print " Immediate code run:\n $code \n " =~ s / ^/ #/ gmr
283
- if ($self -> {Opts }-> {DEBUG });
284
+ if ($self -> {Opts }-> {DEBUG }) {
285
+ (my $c = $code ) =~ s / ^/ #/ gm ;
286
+ emit " Immediate code run:\n $c \n "
287
+ }
284
288
eval ( $code );
285
289
my $err = $@ ; chomp $err ;
286
290
@@ -792,17 +796,12 @@ sub _parse_command_line {
792
796
793
797
sub Main {
794
798
my $self = shift or die (" Please use Text::PerlPP->new()->Main" );
795
-
796
799
my $lrArgv = shift // [];
797
- # say STDERR "\n## -----------------\n## argv:\n",
798
- # (Dumper($lrArgv) =~ s/^/## /mgr);
799
- # say STDERR "self ", Dumper($self);
800
+
800
801
unless (_parse_command_line( $lrArgv , $self -> {Opts } )) {
801
802
return EXIT_OK; # TODO report param err vs. proc err?
802
803
}
803
804
804
- # say STDERR "## opts:\n", (Dumper($self->{Opts}) =~ s/^/## /mgr);
805
-
806
805
if ($self -> {Opts }-> {PRINT_VERSION }) {
807
806
print " PerlPP version $Text::PerlPP::VERSION \n " ;
808
807
if ($self -> {Opts }-> {PRINT_VERSION } > 1) {
@@ -892,9 +891,6 @@ sub Main {
892
891
}
893
892
keys %{$self -> {Opts }-> {SETS }};
894
893
895
- # say STDERR "\n# Defs_RE: $self->{Defs_RE}";
896
- # say STDERR "# Defs_repl_text:\n", (Dumper($self->{Defs_repl_text})=~s/^/# /gmr);
897
- # say STDERR "# Sets\n", (Dumper($self->{Sets})=~s/^/# /gmr);
898
894
# Make the copy for runtime
899
895
emit " my %S = (\n " ;
900
896
for my $defname (keys %{$self -> {Opts }-> {SETS }}) {
0 commit comments