Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

use vs. require

by reneeb (Chaplain)
on Nov 27, 2007 at 15:05 UTC ( [id://653255]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use A;
    my $test = A::B->new(test => 1);
    
  2. or download this
    package A;
    
    sub B{
    ...
    }
    
    1
    
  3. or download this
    A::B called with args <>
    A::B::new called with args: <A::B>
    A::B::new called with args: <A::B=HASH(0x23602c) test 1>
    Attempt to bless into a reference at A.pm line 14.
    
  4. or download this
    require A;
    my $test = A::B->new(test => 1);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-18 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found