Skip Menu |

This queue is for tickets about the TAP-Harness-Archive CPAN distribution.

Report information
The Basics
Id: 95465
Status: resolved
Priority: 0/
Queue: TAP-Harness-Archive

People
Owner: Nobody in particular
Requestors: kaoru [...] slackwise.net
Cc:
AdminCc:

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



Subject: YAML::Tiny->errstr is deprecated as of YAML::Tiny 1.57
https://metacpan.org/pod/YAML::Tiny#errstr-DEPRECATED As of YAML::Tiny 1.57 the errstr method is deprecated, as read() will now throw an exception on error anyway. My proposed fix is: --- /opt/lokku/pkgs/perl-5.16.3/lib/site_perl/5.16.3/TAP/Harness/Archive.pm 2014-05-08 13:52:44.575594991 +0100 +++ Archive.pm 2014-05-08 13:52:39.063597078 +0100 @@ -341,7 +341,9 @@ # parse it into a structure $meta = YAML::Tiny->new()->read($yaml_file); - die "Could not read YAML $yaml_file: " . YAML::Tiny->errstr if YAML::Tiny->errstr; + if ($YAML::Tiny::VERSION < 1.57) { + die "Could not read YAML $yaml_file: " . YAML::Tiny->errstr if YAML::Tiny->errstr; + } if($args->{meta_yaml_callback}) { $args->{meta_yaml_callback}->($meta);
Dne Čt 08.Květen.2014 08:54:06, KAORU napsal(a): Show quoted text
> https://metacpan.org/pod/YAML::Tiny#errstr-DEPRECATED > > As of YAML::Tiny 1.57 the errstr method is deprecated, as read() will > now throw an exception on error anyway. > > My proposed fix is: > > --- /opt/lokku/pkgs/perl- > 5.16.3/lib/site_perl/5.16.3/TAP/Harness/Archive.pm 2014-05-08 > 13:52:44.575594991 +0100 > +++ Archive.pm 2014-05-08 13:52:39.063597078 +0100 > @@ -341,7 +341,9 @@ > > # parse it into a structure > $meta = YAML::Tiny->new()->read($yaml_file); > - die "Could not read YAML $yaml_file: " . YAML::Tiny->errstr > if YAML::Tiny->errstr; > + if ($YAML::Tiny::VERSION < 1.57) { > + die "Could not read YAML $yaml_file: " . YAML::Tiny-
> >errstr if YAML::Tiny->errstr;
> + } > > if($args->{meta_yaml_callback}) { > $args->{meta_yaml_callback}->($meta);
I created fix and pull request. https://github.com/tupinek/TAP-Harness-Archive/commit/43c0d9687c61b0ff92942ded771780574e59a1ab https://github.com/renormalist/TAP-Harness-Archive/pull/3 Kind regards, M.
Thanks, fix applied and uploaded 0.17 to CPAN. Steffen On Thu Apr 02 09:57:45 2015, SKIM wrote: Show quoted text
> Dne Čt 08.Květen.2014 08:54:06, KAORU napsal(a):
> > https://metacpan.org/pod/YAML::Tiny#errstr-DEPRECATED > > > > As of YAML::Tiny 1.57 the errstr method is deprecated, as read() will > > now throw an exception on error anyway. > > > > My proposed fix is: > > > > --- /opt/lokku/pkgs/perl- > > 5.16.3/lib/site_perl/5.16.3/TAP/Harness/Archive.pm 2014-05-08 > > 13:52:44.575594991 +0100 > > +++ Archive.pm 2014-05-08 13:52:39.063597078 +0100 > > @@ -341,7 +341,9 @@ > > > > # parse it into a structure > > $meta = YAML::Tiny->new()->read($yaml_file); > > - die "Could not read YAML $yaml_file: " . YAML::Tiny->errstr > > if YAML::Tiny->errstr; > > + if ($YAML::Tiny::VERSION < 1.57) { > > + die "Could not read YAML $yaml_file: " . YAML::Tiny-
> > > errstr if YAML::Tiny->errstr;
> > + } > > > > if($args->{meta_yaml_callback}) { > > $args->{meta_yaml_callback}->($meta);
> > I created fix and pull request. > > https://github.com/tupinek/TAP-Harness- > Archive/commit/43c0d9687c61b0ff92942ded771780574e59a1ab > > https://github.com/renormalist/TAP-Harness-Archive/pull/3 > > Kind regards, > M.
-- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/>