Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: difference between packages and module

by tlm (Prior)
on Jun 21, 2005 at 12:51 UTC ( [id://468649]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # File: Foo.pm
    
    ...
      print "Hello from Foo!\n";
    }
    __END__
    
  2. or download this
    # File: foo.pl
    require Foo;
    ...
    ::hello();      # prints "Hello from main!\n";
    Foo::hello();   # prints "Hello from Foo!\n";
    __END__
    
  3. or download this
    # File: Foo.pm
    
    ...
      print "Hello from Foo_Helper!\n";
    }
    __END__
    
  4. or download this
    # File: foo.pl
    require Foo;
    ...
    Foo::hello();         # prints "Hello from Foo!\n";
    Foo_Helper::hello();  # prints "Hello from Foo_Helper!\n";
    __END__
    
  5. or download this
    require Foo_Helper;
    
  6. or download this
    Can't locate Foo_Helper.pm in @INC (@INC contains: /usr/local/lib/perl
    +/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /u
    +sr/local/lib/site_perl .) at foo.pl line 2.
    
  7. or download this
    # File: Foo.pm
    
    ...
    
    # Look, Ma!  No Foo!
    __END__
    
  8. or download this
    # File: foo.pl
    require Foo;
    ...
    Bar::hello();         # prints "Hello from Bar!\n";
    Foo_Helper::hello();  # prints "Hello from Foo_Helper!\n";
    __END__
    
  9. or download this
    # File: Foo.pm
    
    ...
    }
    
    __END__
    
  10. or download this
    # File: More_Foo.pm
    
    ...
    }
    
    __END__
    
  11. or download this
    # File: foo.pl
    
    ...
    Foo::hello_2();       # prints "Still in Foo!\n";
    
    __END__
    
  12. or download this
    require Foo;
    require More_Foo;
    
  13. or download this
    Undefined subroutine &Foo::hello_2 called at foo.pl line 10.
    
  14. or download this
    # File: Foo.pm
    
    ...
    sub hello {
      print "Hello from Foo!\n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://468649]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-23 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found