Skip Menu |

This queue is for tickets about the Perl6-Slurp CPAN distribution.

Report information
The Basics
Id: 83222
Status: open
Priority: 0/
Queue: Perl6-Slurp

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: slurp from overloaded File::Temp handle
Date: Sat, 09 Feb 2013 07:09:11 +1100
To: bug-Perl6-Slurp [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With Perl6::Slurp 0.051001 and File::Temp 0.22 in recent debian perl 5.14.2, the program filetemp.pl below gets a warning Argument "/z/tmp/wsWtWhi3GT" isn't numeric in numeric eq (==) at /usr/share/perl5/Perl6/Slurp.pm line 176. I believe this is due to File::Temp not having a numize. David Golden's advice is to compare handles with refaddr. I think File::Temp could helpfully have numize or == or both, but comparing with refaddr would work too and might catch other overloaded handles without a numize, or with some overly creative numize. The aim in Perl6::Slurp is just to notice when the handle is \*ARGV I take it.
use strict; use Perl6::Slurp 'slurp'; use File::Temp; my $fh = File::Temp->new; my $str = slurp $fh;
Subject: Re: [rt.cpan.org #83222] slurp from overloaded File::Temp handle
Date: Sat, 9 Feb 2013 12:01:04 +1100
To: bug-Perl6-Slurp [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Many thanks, Kevin. I've fixed this problem and released a new version to CPAN this morning. Much appreciated! Damian