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: 18979
Status: rejected
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: jesper [...] krogh.cc
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.58
Fixed in: (no value)



Subject: Patch for loading modules.
When loading serialized modules, YAML fails to load the corresponding code. jesper@ubuntulap:~$ cat yamltest --- !perl/DateTime formatter: ~ local_c: day: 29 day_of_quarter: 29 day_of_week: 6 day_of_year: 119 hour: 12 minute: 55 month: 4 quarter: 2 second: 10 year: 2006 local_rd_days: 732430 local_rd_secs: 46510 locale: !perl/DateTime::Locale::en_US default_date_format_length: medium default_time_format_length: medium en_complete_name: English United States en_language: English en_territory: United States id: en_US native_complete_name: English United States native_language: English native_territory: United States offset_modifier: 0 rd_nanosecs: 0 tz: !perl/DateTime::TimeZone::UTC name: UTC utc_rd_days: 732430 utc_rd_secs: 46510 utc_year: 2007 jesper@ubuntulap:~$ perl -MYAML -e'my $dt = YAML::LoadFile("yamltest"); print $dt->ymd() . "\n";' Can't locate object method "ymd" via package "DateTime" at -e line 1. jesper@ubuntulap:~$
Subject: yaml.patch
diff -Nur YAML-0.58/lib/YAML/Loader.pm YAML-0.58-mod/lib/YAML/Loader.pm --- YAML-0.58/lib/YAML/Loader.pm 2006-02-02 08:03:35.000000000 +0100 +++ YAML-0.58-mod/lib/YAML/Loader.pm 2006-04-29 15:40:16.000000000 +0200 @@ -265,6 +265,7 @@ $explicit =~ m{^perl/(\@|\$)?([a-zA-Z](\w|::)+)$} ) { $class = $YAML::TagClass->{$explicit} || $2; + eval " require $class; import $class; "; if ($class->can('yaml_load')) { require YAML::Node; return $class->yaml_load(YAML::Node->new($node, $explicit));
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/61 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.
Closing this, see github issue.