Skip Menu |
 

This queue is for tickets about the XML-NamespaceSupport CPAN distribution.

Report information
The Basics
Id: 15923
Status: new
Priority: 0/
Queue: XML-NamespaceSupport

People
Owner: Nobody in particular
Requestors: perlover [...] perlover.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.09
Fixed in: (no value)



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Subject: undeclare_prefix bug as i think (not tested)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 953
Download (untitled) / with headers
text/plain 953b
XML-NamespaceSupport v1.09 I researched sources you XML::NamespaceSupport 1.09 version and found interesting place. I think there is bug. The chunk from code: sub undeclare_prefix { my $self = shift; my $prefix = shift; return unless not defined $prefix or $prefix eq ''; return unless exists $self->[NSMAP]->[-1]->[PREFIX_MAP]->{$prefix}; This line (return unless not defined $prefix or $prefix eq '';) is very strange. I have tested such test: $prefix = 'alex'; print "alex\n" unless not defined $prefix or $prefix eq ''; After i see 'alexl'. Thus teh prefix will be alex or other string, we will get return execution. Thus undeclare_prefix will not work properly. If $prefix = '' i will not see "alex" string. And if $prefix will be undef i don't see "alex" too (i think this is incorrect too) My suggestion: To change this line to return if not defined($prefix); This code will work if the prefix will be any string or '';


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.