Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 23729
Status: new
Priority: 0/
Queue: YAML

Owner: Nobody in particular
Requestors: AYOUNG [...]

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

Subject: YAML::Base $default_as_code minor regex problem
Download (untitled) / with headers
text/plain 965b
I can't tell you how to reproduce this problem because I don't know how it's getting to this point. I have an app that works fine from the browser but from the command line gives "Global symbol "$VAR1" requires explicit package name". This doesn't make any sense to me how this is happening. In any case, I stepped through to this point and in the YAML::Base module, $default_as_code anonymous subroutine the line 'my $code = $Data::Dumper::Dumper(1)' returns '__$VAR1 = 'YAML::Dumper''. The next line strips the $VAR1 from the beginning of the line, but fails because of the spaces. The following fixed it: -- 2006-11-30 11:52:11.000000000 -0700 +++ 2006-11-30 11:52:29.000000000 -0700 @@ -162,7 +162,7 @@ require Data::Dumper; local $Data::Dumper::Sortkeys = 1; my $code = Data::Dumper::Dumper(shift); - $code =~ s/^\$VAR1 = //; + $code =~ s/^\s*\$VAR1 = //; $code =~ s/;$//; return $code; };

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

Please report any issues with to