Skip Menu |
 

This queue is for tickets about the Net-Amazon-Signature-V4 CPAN distribution.

Report information
The Basics
Id: 107310
Status: resolved
Priority: 0/
Queue: Net-Amazon-Signature-V4

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

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

Attachments
0002-switch-from-File-Slurp-to-File-Slurper.patch



Subject: Switch from File::Slurp to File::Slurper
Download (untitled) / with headers
text/plain 277b
File::Slurp has a number of issues -- here is one summary: http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html Attached is a patch that fixes this. (It should be applied after the patch in https://rt.cpan.org/Ticket/Display.html?id=107308.)
Subject: 0002-switch-from-File-Slurp-to-File-Slurper.patch
From aee23453a79c72a4cea5dfb9db31c8a9588ae701 Mon Sep 17 00:00:00 2001 From: Karen Etheridge <ether@cpan.org> Date: Thu, 24 Sep 2015 15:36:18 -0700 Subject: [PATCH 2/2] switch from File::Slurp to File::Slurper --- Makefile.PL | 2 +- t/10-aws-tests.t | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index d5fb537..95a9b86 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -22,7 +22,7 @@ WriteMakefile( }, TEST_REQUIRES => { 'Test::More' => 0, - 'File::Slurp' => 0, + 'File::Slurper' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Net-Amazon-Signature-V4-*' }, diff --git a/t/10-aws-tests.t b/t/10-aws-tests.t index 617245c..68f291c 100644 --- a/t/10-aws-tests.t +++ b/t/10-aws-tests.t @@ -3,7 +3,7 @@ use warnings; use strict; use Net::Amazon::Signature::V4; -use File::Slurp; +use File::Slurper 'read_text'; use HTTP::Request; use Test::More; @@ -25,7 +25,7 @@ ok( -d $testsuite_dir, 'testsuite directory existence' ); for my $test_name ( @test_names ) { ok( -f "$testsuite_dir/$test_name.req", "$test_name.req existence" ); - my $req = HTTP::Request->parse( scalar read_file( "$testsuite_dir/$test_name.req" ) ); + my $req = HTTP::Request->parse( read_text( "$testsuite_dir/$test_name.req" ) ); #diag("$test_name creq"); my $creq = $sig->_canonical_request( $req ); @@ -49,7 +49,7 @@ for my $test_name ( @test_names ) { sub string_fits_file { my ( $str, $expected_path ) = @_; - my $expected_str = read_file( $expected_path ); + my $expected_str = read_text( $expected_path ); $expected_str =~ s/\r\n/\n/g; is( $str, $expected_str, $expected_path ); return $str eq $expected_str; -- 2.4.5
Addressed in 0.16


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.