Skip Menu |
 

This queue is for tickets about the HTML-Mason CPAN distribution.

Report information
The Basics
Id: 55159
Status: open
Priority: 0/
Queue: HTML-Mason

People
Owner: Nobody in particular
Requestors: pause [...] nodekit.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.44
Fixed in: (no value)



Subject: Undef warning w/anonymous components
Download (untitled) / with headers
text/plain 609b
Hi, The documentation for HTML::Mason::Component states that the value returned by "dir_path" is undefined for anonymous components. However, when using anonymous components, this can lead to an undef warning from HTML::Mason::Tools: Use of uninitialized value $dir_path in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.10.1/HTML/Mason/Tools.pm line 114. The line referenced above is a join() in the absolute_comp_path function. I suggest that Component.pm and Request.pm should check to see if the current component's comp_id is set, before calling absolute_comp_path. Thanks, --Alex
From: pause [...] nodekit.org
Download (untitled) / with headers
text/plain 437b
More info-- This issue occurs when I execute an anonymous component which calls other components (via <& &> or $m->comp inside the anon component). A simpler fix might be to have absolute_comp_path always stringify the second arg-- I did not observe any side effects or other weirdness by hacking absolute_comp_path to do ||= "" on $dir_path before trying to use it. Please don't hesitate to contact me if I can be of any help. --Alex
Download (untitled) / with headers
text/plain 608b
On Wed Mar 03 16:04:26 2010, pause@nodekit.org wrote: Show quoted text
> More info-- This issue occurs when I execute an anonymous component > which calls other components (via <& &> or $m->comp inside the anon > component). > > A simpler fix might be to have absolute_comp_path always stringify the > second arg-- I did not observe any side effects or other weirdness by > hacking absolute_comp_path to do ||= "" on $dir_path before trying to > use it. > > Please don't hesitate to contact me if I can be of any help.
Sorry for the ridiculously slow reply. If you have code that can replicate this I can probably fix it.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.