Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Module Creation and Function Call

by thargas (Chaplain)
on Mar 19, 2012 at 18:49 UTC ( #960459=note: print w/ replies, xml ) Need Help??


in reply to Module Creation and Function Call

First, add:

use strict; use warnings;
to your module so that perl will tell you of all the different things you're doing which probably aren't what you want.

Then go read the docs on creating subs: perldoc perlsub ignoring the stuff about attributes (you don't need them) and prototypes (you don't want them either). That will tell you why you don't want to use &Configchk.

Then you can read the docs for Exporter (perldoc Exporter) which may help with why you can't see @arr_iVPU_standard. (Hint: it's real name is @iVPU_Parameter::arr_iVPU_standard). But that doesn't really matter because you really don't want to do that either. Pass the array's in as array-refs, because (... you'll know why from reading perlsub)

Perl comes with lots of well written, well organized documentation. I won't tell you to read all of it, but please do read the relevant parts. If you're not sure which they are, try: perldoc perl or google for it.


Comment on Re: Module Creation and Function Call
Select or Download Code
Re^2: Module Creation and Function Call
by educated_foo (Vicar) on Mar 20, 2012 at 12:56 UTC
    Does any of your thoughtless boilerplate advice, other than "Perl comes with lots of well written, well organized documentation," do anything to help solve the OP's problem?
      I thought it might help, if followed. It was a selection of advice pointed at the problems in his code. I learned perl by reading the online docs, so it *is* possible.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-09-19 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (140 votes), past polls