I am currently working in a mason environment inside mod_perl.
Additionally I have written a Perl module which controls the flow of
execution. This perl module can now call another perl module and its
subs, or decide to call a component which will do the work. For this
purpose the module gets access to the Mason $m object. when I now want
to call a Mason component, an error occurs and Mason says me 
        'could not find component for path foo' 
or sometimes, but less often 
        'Can't call method "dir_path" on an undefined value
        at /usr/share/perl5/HTML/Mason/Request.pm line 1087'

Is this intended, should I play around with Mason's Interp or is this
maybe a bug?

To verify this behaviour you can copy the following module
        use strict;
        use warnings;
        
        package Mason;
        
        sub output_with_mason
        {
                my ($m, $path) = @_;
                $m->comp($path);
        }
        1;
        
and use the following component:
        <%perl>
        use Piso::Mason;
        
        Piso::Mason::output_with_mason( $m, '/path/to/a/file' );
        </%perl>
        
Simply adjust the path inside the component and call, put the Module in
the appropriate dir and call the component.

I am currently using Mason 1.32 on ubuntu dapper drake with
Apache/1.3.34 with mod_perl statically compiled in.

Thank you for your help




_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to