Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: problem referencing global variable in self-written module

by HuckinFappy (Pilgrim)
on Jun 08, 2006 at 01:07 UTC ( [id://554193]=note: print w/replies, xml ) Need Help??


in reply to problem referencing global variable in self-written module

Oh, to be a monk of high enough ranking to edit your post and add the <code> tags so it would be readable... Regardless...I'll try and help. You did tell perl that Fleece.pm exports things, by:
use Exporter;
But nowhere do you tell it *what* to export.
@EXPORT = qw( $fleece );
Or better:
@EXPORT_OK = qw( $fleece );
This would be slightly better since users would have to specifically ask for $fleece to get it:
use Fleece qw( $fleece );
It's considered good form to not clutter of someone's namespace recklessly. I'd suggest a read of the Exporter Documentation would help you understand all this a little better. HTH, Jeff

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-09-18 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (24 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.