Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Module Creation and Function Call

by thargas (Deacon)
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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://960459]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2017-12-15 07:09 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (419 votes). Check out past polls.