Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-ReadmeAnyFromPod CPAN distribution.

Report information
The Basics
Id: 89728
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-ReadmeAnyFromPod

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

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



Subject: 0.132962-TRIAL accidentally omits a "require File::Slurp" statement.

Diff: https://metacpan.org/diff/release/RTHOMPSON/Dist-Zilla-Plugin-ReadmeAnyFromPod-0.131500/RTHOMPSON/Dist-Zilla-Plugin-ReadmeAnyFromPod-0.132962-TRIAL#lib/Dist/Zilla/Plugin/ReadmeAnyFromPod.pm

     elsif ( $self->location eq 'root' ) {
-        require File::Slurp;
         my $file = $self->zilla->root->file($filename);
         if (-e $file) {
             $self->log("Override $filename in root");
         }
-        File::Slurp::write_file("$file", {binmode => ':raw'}, $content);
+        my $encoded_content = encode($self->_get_source_encoding(),
+                                     $content);
+        File::Slurp::write_file("$file", {binmode => ':raw'}, $encoded_content);
     }

 

Fallout:

 

[DZ] beginning to build Path-FindDev

[DZ] guessing dist's main_module is lib/Path/FindDev.pm

[@Author::KENTNL/Git::NextVersion] Bumping version from 0.4.1 to 0.4.2

[DZ] extracting distribution abstract from lib/Path/FindDev.pm

[@Author::KENTNL/ReadmeAnyFromPod] Override README.mkdn in root

Undefined subroutine &File::Slurp::write_file called at /home/travis/perl5/perlbrew/perls/5.19/lib/site_perl/5.19.0/Dist/Zilla/Plugin/ReadmeAnyFromPod.pm line 147.

 

 

Oops, I'm in the process of replacing File::Slurp with Path:Tiny. Try v0.132973-TRIAL when it comes out.