in reply to Removing CODE slot in typeglob / Reversing "use subs ...;"
I've done no real testing (my food is ready), but is this the effect you are looking for?
#! perl -slw use strict; use 5.010; sub FOO () { 'foo' } BEGIN { undef $::{FOO} } say defined &FOO ? 'subroutine defined' : 'subroutine undef'; say eval 'FOO if $false; 1' ? 'FOO allowed' : 'FOO not allowed'; __END__ C:\test>660264.p10 subroutine undef FOO not allowed
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Removing CODE slot in typeglob / Reversing "use subs ...;"
by lodin (Hermit) on Jan 03, 2008 at 18:21 UTC | |
by BrowserUk (Patriarch) on Jan 03, 2008 at 18:33 UTC | |
by lodin (Hermit) on Jan 03, 2008 at 18:58 UTC | |
by BrowserUk (Patriarch) on Jan 03, 2008 at 19:13 UTC | |
by lodin (Hermit) on Jan 03, 2008 at 19:24 UTC |