Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w 
    
    use strict;
    ...
    package main;
    
    my $foo = new Foo;
    
  2. or download this
    my $do_it = \&Foo::do_it;
    $do_it->('direct call');
    
  3. or download this
    my $ref = ref($foo);
    my $do_it2;
    eval "\$do_it2 = \\&${ref}::do_it";
    $do_it2->('indirect call');