Re: subcomponents for anonymous components

Kovacs Baldvin <[email protected]> Wed, 26 Oct 2005 14:23:22 +0200
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Tue, Oct 25, 2005 at 22:19 -0500, Dave Rolsky wrote:
> On Wed, 26 Oct 2005, Kovacs Baldvin wrote:
> 
> >may I suggest this patch for Subcomponent.pm? This is really just
> >a little thing: for anonymous components this throws warnings for
> >undefined values without this...
> 
> Looks good but can you provide a test case.  Ideally it'd fit into the 
> test harness but just sample code would be good.

Well, here's a simple code that warns if you don't apply the patch:

<%perl>

my $txt = <<'EOF';

<%def subcomponent>
  Here is it.
</%def>

<& subcomponent &>

EOF

my $comp = $m->interp->make_component( comp_source => $txt );
$m->comp($comp);

</%perl>


Its not like how I ran into it, but illustrates the thing.

Best regards,
Baldvin Kovacs


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information