Well, if you want constant folding, then you'll have to deal with the warning being generated. It's a mandatory warning.
Of course, just because the warning will be generated; doesn't mean it has to be displayed. $SIG{__WARN__} can catch and hide it.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
| [reply] [d/l] |
C:\test>perl -wE"$SIG{__WARN__}=sub{}; sub f(){1}; say f; sub f(){2};
+say f;"
Constant subroutine f redefined at -e line 1.
1
2
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP Neil Armstrong
| [reply] [d/l] |
perl -wE'BEGIN{$SIG{__WARN__}=sub{}}; sub f(){1}; say f; sub f(){2}; s
+ay f;'
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
| [reply] [d/l] [select] |
$ perl -wE"BEGIN{$SIG{__WARN__}=sub{};} sub f(){1}; say f; sub f(){2};
+ say f;"
1
2
| [reply] [d/l] |