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: resolved
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: AYOUNG [...] cpan.org
Cc:
AdminCc:

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



Subject: YAML::Base $default_as_code minor regex problem
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: -- Base.pm.orig 2006-11-30 11:52:11.000000000 -0700 +++ Base.pm 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 issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/74 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.