Help for this page

Select Code to Download


  1. or download this
    require Module1;
    require Module2;
    
    Module1::foo();
    Module2::foo();
    
  2. or download this
    my $mod = some_condition() ? 'Module1' : 'Module2';
    eval "require $mod; ${mod}::foo()";
    
  3. or download this
    use strict;
    use warnings;
    ...
    # eval "$mod->import( 'foo' ); 1" or die;
    
    foo();