subcomponents for anonymous components
Kovacs Baldvin <[email protected]> Wed, 26 Oct 2005 00:49:03 +0200
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi List,
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...
Best Regards,
Baldvin
--- /usr/share/perl5/HTML/Mason/Component/Subcomponent.pm
2005-09-05 04:44:32.000000000 +0200
+++ HTML/Mason/Component/Subcomponent.pm 2005-10-26
00:44:20.000000000 +0200
@@ -31,7 +31,8 @@
$self->SUPER::assign_runtime_properties($interp, $source);
$self->{comp_id} = sprintf("[%s '%s' of %s]", $self->{is_method} ? 'method' : 'subcomponent',
$self->name, $self->owner->comp_id);
- $self->{path} = $self->owner->path . ":" . $self->name;
+ $self->{path} = ( $self->owner->path || $self->owner->name) .
+ ":" . $self->name;
}
sub cache_file { return $_[0]->owner->cache_file }
-------------------------------------------------------
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