Skip Menu |

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

Report information
The Basics
Id: 47356
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: warning from fail to exec piped program
Date: Fri, 26 Jun 2009 11:57:56 +1000
To: bug-perl6-slurp [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With Perl6::Slurp 0.03 and recent debian packaged perl 5.10.0, a little program use Perl6::Slurp; print Perl6::Slurp::slurp ('-|', 'nosuchprogramname'); print "done\n"; prints Can't exec "nosuchprogramname": No such file or directory at /usr/share/perl5/Perl6/Slurp.pm line 93. Can't open 'nosuchprogramname': No such file or directory at foo.pl line 2 I think the first is a warning and the second is a croak. I hoped that it wouldn't double-up like that, ie. that if slurp() is going to croak on error that it wouldn't also print a warning. The warning is fairly inconvenient when using an eval{} to trap the error. I made myself a localized __WARN__ handler to suppress it, and wondered if Perl6::Slurp might do that itself at a suitable point. I see the warning is a documented feature of open() -- though you'd probably think it ought to be enough for it to give its error return, without further verbiage.
Subject: Re: [rt.cpan.org #47356] warning from fail to exec piped program
Date: Sat, 27 Jun 2009 09:53:21 +1000
To: bug-Perl6-Slurp [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
2009/6/26 Kevin Ryde via RT <bug-Perl6-Slurp@rt.cpan.org>: Show quoted text
> >    use Perl6::Slurp; >    print Perl6::Slurp::slurp ('-|', 'nosuchprogramname'); >    print "done\n"; > > prints > >    Can't exec "nosuchprogramname": No such file or directory at /usr/share/perl5/Perl6/Slurp.pm line 93. >    Can't open 'nosuchprogramname': No such file or directory at foo.pl line 2 > > I think the first is a warning and the second is a croak.  I hoped that > it wouldn't double-up like that, ie. that if slurp() is going to croak > on error that it wouldn't also print a warning.
Right. Very annoying. Fixed for the next release. Thanks. Damian