Hi All

I'm converting a mod_perl module-based site to HTML::Mason and have a
question about passing arguments to a component.

my $penuser = $r->connection->user;
my $authzrc = $m->comp( 'authzREPSYS', data_aref=>\@data_refs,
hconnref=>\%hconn, penuser=>$penuser );

With this call I want the component to authzREPSYS to check a users
authorizations from database, fill out the array pointed to by \@data_refs
with the list of those authorizations, and return a boolean to $authzrc to
signify whether the user has any priveleges at all. The documentation says
that one must pass arrays and hashes as refs, which are then automatically
converted. What if I don't want it automatically converted? Is it
sufficient just to have:

<%args>
$data_aref
$hconnref
$penuser
</%args>

in the component instead of:

<%args>
@data_aref
%hconnref
$penuser
</%args>

The code work fine as a subroutine in the mod_perl module, but not as a
Mason component. Any help would be greatly appreciated.

Thanks,
Bill


Reply via email to