BEGIN {
my $verbosity = shift; # or Getopts::Std, whatever...
eval "sub verbose () { $verbosity }";
}
####
print "Holy Crap = $holy_crap\n" if $verbose >= 1;
####
qwurx [shmem] ~ > perl -MO=Deparse,-x,-p - 1
BEGIN {
my $verbose;
1 while ($verbose = shift) !~ /^\d$/; # get rid of -MO=Dep...
eval "sub verbose () { $verbose }";
}
print "Holy Crap = $holy_crap\n" if verbose >= 1;
__END__
sub BEGIN {
my($verbose);
'???' while (not (($verbose = shift(@ARGV)) =~ /^\d$/));
eval("sub verbose () { $verbose }");
}
print("Holy Crap = $holy_crap\n");
__DATA__
- syntax OK
qwurx [shmem] ~ > perl -MO=Deparse,-x,-p - 0
BEGIN {
my $verbose;
1 while ($verbose = shift) !~ /^\d$/; # get rid of -MO=Dep...
eval "sub verbose () { $verbose }";
}
print "Holy Crap = $holy_crap\n" if verbose >= 1;
__END__
sub BEGIN {
my($verbose);
'???' while (not (($verbose = shift(@ARGV)) =~ /^\d$/));
eval("sub verbose () { $verbose }");
}
'???'; <----- hooray! gone :-)
__DATA__
- syntax OK