Help for this page

Select Code to Download


  1. or download this
    use strict;
    my $var = 'Test::foo';
    no strict 'refs'; # we need to leave use strict
    *$var = sub {print "Bar\n";};
    use strict; # turn it back on
    
  2. or download this
    package SafeCaller;
    
    sub safe_caller { return caller(@_) if caller_allowed(); }
    # disallow everyone from using safe_caller
    sub caller_allowed { reutrn 0; }