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

Re: Problems with using strict

by pfaut (Priest)
on Apr 19, 2003 at 15:23 UTC ( [id://251671]=note: print w/replies, xml ) Need Help??


in reply to Problems with using strict

Get rid of the eval block and replace it with use Country. Other posts in this thread will show you how to get the location of your module into @INC so it can be loaded with a simple 'use'. Then put the following into Country.pm.

package Country; use strict; use base 'Exporter'; our @EXPORT = qw(%country); our %country = ( af => 'afghanistan', ao => 'angola', ar => 'argentina', at => 'austria', au => 'australia', bd => 'bangladesh', be => 'belgium', bg => 'bulgaria', ); 1;

This should get rid of your errors when using strict.

See perldoc Exporter for help on using EXPORT.

90% of every Perl application is already written.
dragonchild

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-24 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found