in reply to my My $my;
qwurx [shmem] ~ > perl -MO=Deparse -le 'my My $my = "my"' No such class My at -e line 1, near "my My" -e had compilation errors. BEGIN { $/ = "\n"; $\ = "\n"; } $my = 'my';
So it enforces the existence of that class; given that, it parses fine:
qwurx [shmem] ~ > perl -MO=Deparse -le 'package My; package main; my M +y $my = "my"' BEGIN { $/ = "\n"; $\ = "\n"; } my $my = 'my'; -e syntax OK
Dunno how that relates to being 'bound to the use of "fields" pragma' as the docs state, though.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: my My $my;
by Thilosophy (Curate) on Oct 22, 2007 at 09:45 UTC | |
by grinder (Bishop) on Oct 22, 2007 at 10:14 UTC | |
by shmem (Chancellor) on Oct 22, 2007 at 13:59 UTC |