in reply to AmpKiller.pm to disallow $&, etc.

That module only "works" if the flow of the program actually fetches $&. The following program has $& in it (and hence, penalties occur), but the FETCH is never triggered:
#!/usr/bin/perl use strict; use warnings; use AmpKiller; "foo" =~ /o/; if (@ARGV) { print $&, "\n"; } print "The End\n"; __END__ The End

Abigail

Replies are listed 'Best First'.
Re: Re: AmpKiller.pm to disallow $&, etc.
by ysth (Canon) on Jan 27, 2004 at 17:10 UTC
    No, penalties do not occur, as you can verify with Devel::SawAmpersand. Because I set a *& glob up, the code in gv_fetchpv to set up a new variable isn't triggered. The only purpose of croaking is to detect problems in eval'd code as a result of disabling $&.