Help for this page

Select Code to Download


  1. or download this
    package Foo;
    use strict;
    ...
    my $c = Foo->new(name => 'Aragorn', alias => 'Strider', race => 'Human
    +');
    print "name: $c->{name}\n"; 
    print "job:  $c->{job}\n";
    
  2. or download this
    $ perl test.pl 
    name: Aragorn
    Attempt to access disallowed key 'job' in a restricted hash at test.pl
    + line 26.