Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #63476] Cannot find current script '/dev/null' at /usr/share/perl/5.10/FindBin.pm line 206

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

May 1, 2012, 6:52 PM

Post #1 of 3 (56 views)
Permalink
[perl #63476] Cannot find current script '/dev/null' at /usr/share/perl/5.10/FindBin.pm line 206

On Thu Dec 17 10:15:17 2009, jesse wrote:
> On Wed Feb 25 05:22:58 2009, jozef [at] kutej wrote:
> >
> > This is a bug report for perl from jozef [at] kutej,
> > generated with the help of perlbug 1.36 running under perl 5.10.0.
> >
> >
> > ----------------------------------------------------------------
> -
> > When I do 'use FindBin' under mod_perl I get following error:
> >
> > Cannot find current script '/dev/null' at
> > /usr/share/perl/5.10/FindBin.pm line 206
> > BEGIN failed--compilation aborted at /usr/share/perl/5.10/FindBin.pm
> > line 206.
> >
> > It probably because of:
> > croak("Cannot find current script '$0'") unless(-f $script);
> >
> > As "/dev/null is" not a file (but a -b "block special file") it
> > croaks.
> >
>
> This does sort of feel like FindBin is doing the right thing. Have you
> talked to the mod_perl folks about $0?

Discussion in this thread petered out three years ago. Jesse seems to
be saying that this is not a bug in FindBin. Should we keep this ticket
open?

Thank you very much.
Jim Keenan


---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=63476


jozef at kutej

May 2, 2012, 3:43 AM

Post #2 of 3 (46 views)
Permalink
Re: [perl #63476] Cannot find current script '/dev/null' at /usr/share/perl/5.10/FindBin.pm line 206 [In reply to]

On 2012-05-02 03:52, James E Keenan via RT wrote:
> Discussion in this thread petered out three years ago. Jesse seems to
> be saying that this is not a bug in FindBin. Should we keep this ticket
> open?

Nope, just close it.

Cheers
Jozef


ikegami at adaelis

May 3, 2012, 12:32 AM

Post #3 of 3 (46 views)
Permalink
Re: [perl #63476] Cannot find current script '/dev/null' at /usr/share/perl/5.10/FindBin.pm line 206 [In reply to]

On Tue, May 1, 2012 at 9:52 PM, James E Keenan via RT <
perlbug-followup [at] perl> wrote:

> Discussion in this thread petered out three years ago. Jesse seems to
> be saying that this is not a bug in FindBin. Should we keep this ticket
> open?
>

ModPerl::Registry does set $0, so FindBin should work fine from registry
scripts (though you'll need to call C<< FindBin::again() >> as per the
documentation).

I presume this problem occurs if he tries to load FindBin from the startup
script or equivalent, in which case it falls to mod_perl to provide
something useful in $0.

Even if I'm missing something, I don't see how this can possibly be a
problem with FindBin.

Closing this ticket.

- Eric

Mod::PerlRegistry's wrapper:

my $eval = join '',
'package ',
$self->{PACKAGE}, ";",
"sub handler {",
"local \$0 = '$script_name';",
$nph,
$shebang,
$line,
${ $self->{CODE} },
"\n}"; # last line comment without newline?

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.