Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How to access a hash from another file

by jethro (Monsignor)
on Oct 14, 2011 at 11:58 UTC ( [id://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 (Curate) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://931487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found