Help for this page

Select Code to Download


  1. or download this
    pl@nereida:~/LEyapp/examples$ cat localwithlocal3.pl
    #!/usr/local/bin/perl -w
    ...
    my $obj = Tutu->new();
    
    $obj->plim();
    
  2. or download this
    #!/usr/local/bin/perl -w
    use strict;
    ...
    # Let us provoke an exception
    Tutu::protected();
    
  3. or download this
    $ attributeprotectedwithlocal.pl
    Accessing 'protected' as a method: inside overwritten tutu!
    main does not even know of 'Tutu::protected'
    Accessing 'protected' as a method: inside overwritten tutu!
    Undefined subroutine &Tutu::protected called at ./attributeprotectedwi
    +thlocal.pl line 49.
    
  4. or download this
    pl@nereida:~/LEyapp/examples$ cat attributeprotected.pl
    #!/usr/local/bin/perl -w
    ...
    my $some = SomeClass->new;
    $some->foo;           # OK
    print ($some->can('_bar')?"Yes, main can see that SomeClass has a _bar
    + method\n":"no\n");
    
  5. or download this
    $ attributeprotected.pl
    Yes, main can see that SomeClass has a _bar method
    
  6. or download this
     94 my $attgram = new Language::AttributeGrammar <<'EOG';
     95
    ...
    114   my $res = $attgram->apply($t, 'val');
    115 }
    116 # Restored  old version of Language::AttributeGrammar::Parser::_ge
    +t_child