in reply to using perl variable in muliple modules
It sounds like you're asking how make functions from other namespaces catch input parameters, yes?
The answer is: same way you do it in a regular function. Perl passes all input parameters in the array @_, and automagically shuffles @_ from namespace to namespace when you call an object method. Your modules will probably end up looking something like this:
package NewTitle1; sub titler { my $input_value = shift; my $title = ## munge $input_value into a title return ($title); } package NewMeta; sub newDesc { my $input_value = shift; my $meta = ## munge $input_value into a meta tag return ($meta); } package MakeLink; sub exportLinks { my $input_string = shift; my @links = ## munge $input_value into a list of links return ($meta); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: using perl variable in muliple modules
by jeremy_goodrich (Initiate) on Dec 28, 2001 at 01:30 UTC | |
by tilly (Archbishop) on Jan 03, 2002 at 21:16 UTC |