Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Create a built-in-like sub?

by CharlesClarkson (Curate)
on Feb 01, 2002 at 11:22 UTC ( #142652=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Create a built-in-like sub?
in thread Create a built-in-like sub?

First, there is an error in GLOBAL.pm

package GLOBAL; use base 'Exporter'
is missing ';'
use base 'Exporter';
our @EXPORT = qw(compress); sub compress { print shift; } 1;

Second, add use GLOBAL; to MODULE.pm

package MODULE; use GLOBAL; sub test { compress "test\n"; } 1;



HTH,
Charles K. Clarkson


Comment on Re: Re: Re: Create a built-in-like sub?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2015-07-03 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls