in reply to Why shows B::Deparse __END__ as __DATA__?
There's absolutely no difference between __END__ and __DATA__, just like there's absolutely no difference between for and foreach.
$ perl -MO=Deparse -e'foreach (@a) { }' foreach $_ (@a) { (); } -e syntax OK $ perl -MO=Deparse -e'for (@a) { }' foreach $_ (@a) { (); } -e syntax OK
$ perl -MO=Deparse -e'for (a(); b(); c()) { }' for (a(); b(); c()) { (); } -e syntax OK $ perl -MO=Deparse -e'foreach (a(); b(); c()) { }' for (a(); b(); c()) { (); } -e syntax OK
Since there's no difference, Deparse has no idea which one was used in the source, so it uses whatever it finds most idiomatic.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why shows B::Deparse __END__ as __DATA__? (BUG #1)
by LanX (Saint) on Oct 12, 2014 at 12:45 UTC | |
by LanX (Saint) on Oct 12, 2014 at 13:25 UTC | |
by LanX (Saint) on Oct 12, 2014 at 15:26 UTC | |
by karlgoethebier (Abbot) on Oct 12, 2014 at 17:10 UTC | |
|
Re^2: Why shows B::Deparse __END__ as __DATA__?
by LanX (Saint) on Oct 12, 2014 at 03:05 UTC |