Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Subroutine reference in @INC

by Dominus (Parson)
on Mar 21, 2002 at 22:31 UTC ( [id://153448]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        push @INC, \&my_sub;
        sub my_sub {
        my ($coderef, $filename) = @_;    # $coderef is \&my_sub
        ...
        }
    
  2. or download this
        push @INC, [ \&my_sub, $x, $y, ... ];
        sub my_sub {
    ...
        my @parameters = @$arrayref[1..$#$arrayref];
        ...
        }
    
  3. or download this
        # In Foo.pm
        package Foo;
    ...
    
        # In the main program
        push @INC, new Foo(...);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found