On Wed, 26 Apr 2006, John Siracusa wrote:

I tried to follow the example in the documentation for the
HTML::Mason::Resolver::Null module, but it fails with the following error:

Mandatory parameter 'comp' missing in call to HTML::Mason::Request->new()

(That's after I fixed the typo where \$var is used instead of \$buffer.)
This code works, however:

---
use HTML::Mason::Interp;
use HTML::Mason::Resolver::Null;

my $interp =
 HTML::Mason::Interp->new(resolver_class => 'HTML::Mason::Resolver::Null');

my $comp = $interp->make_component(comp_source => <<'EOF');
% my $var = 'World';
Hello, <% $var %>!
EOF

my $buffer;
my $request = $interp->make_request(out_method => \$buffer, comp => $comp);
$request->exec;

print $buffer;
---

Assuming it's correct, the example should be updated.  And if it's not
correct, please tell me how I should do this :)

That definitely seems right. I'm not sure, but I think this is related to changes for 1.3x. I'll change the example in the repo.


Thanks,

-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to