I know that all the values passed into a module are in @_
assume @_ looks like [ c , 3 , d , 4 ]
ITYM: "passed into a Mason component"
no trailing semi-colon please..
$a is 1 and $b is 2 by default. check the following link.
Regards,
Xicheng
I read the pages, no help.
I guess I need to re sum what I'm after
Assume I have this mason file:
<%args>
$a
$b
$c => 3
$d => 4
</%args>
Now I have a perl function that needs the input of %args to/%args and
their default value.
I know this works
myRoutine('a' => $a,
'b' => $b,
'c' => $c,
'd' => $d);
in perl
sub myRoutine {
my %args = @_;
...
}
THere are about 40 of these mason files that have different <
%args> ... </%args> within them. I'm trying to reuse as much code as
possible and cut down on the number of places I have to mainitain so
what I'm looking for is something to the effect of
<%args>
$a
$b
$c => 3
$d => 4
</%args>
myRoutine(\%ARGS);
But %ARGS or @_ may not contain c and d unless they were passed in.
myRoutine needs all arguments, in %ARGS and between %args and /%args.
%ARGS and @_ will contain the manditory input, not the input with
default values.- Hide quoted text -
- Show quoted text -