Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Subroutine reference in @INC

by IlyaM (Parson)
on Mar 21, 2002 at 22:23 UTC ( #153445=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
Node Status?
node history
Node Type: note [id://153445]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2018-11-15 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (188 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!