Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How to access a hash from another file

by jethro (Monsignor)
on Oct 14, 2011 at 11:58 UTC ( #931487=note: print w/replies, xml ) Need Help??


in reply to How to access a hash from another file

As usual error messages tell you something. Read them instead of just acknowledging them. If you don't understand them directly, google them or find them in the documentation.

In this case probably the error message told you that the evaluation of parameter.pm resulted in a false value, which should not be (although I don't have the slightest idea why this was built into the module system). Just add as a last statement anything that results to true, usually everyone just adds

1;

as the last line of a .pm file

Replies are listed 'Best First'.
Re^2: How to access a hash from another file
by vagabonding electron (Chaplain) on Oct 14, 2011 at 12:14 UTC
    Sorry for incomplete message, jethro.
    In fact I did add the last statement 1; The error message says: Global symbol "%module" requires explicit package name at ...
    How should I name a hash from the module?
    As to:
    I don't have the slightest idea why this was built into the module system
    I simply cannot figure out how can I get it otherwise. One way is simply to let the hash in the main file, but as already said the hash grows huge and the main file will be confusing.
    Thanks.
    VE

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2018-12-18 16:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (80 votes). Check out past polls.

    Notices?