Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Previously unseen error in connection with -X functions

by blazar (Canon)
on Oct 31, 2008 at 12:05 UTC ( [id://720687]=note: print w/replies, xml ) Need Help??


in reply to Re: Previously unseen error in connection with -X functions
in thread Previously unseen error in connection with -X functions

I personally believe this is great news. I actually ignored that readpipe is the beast behind qw. Anyway, to quote from the post you linked to:

The prototype of readpipe() is now ($). Previously, it was broken: $ perl5.8.8 -wle 'print prototype"CORE::readpipe"' Can't find an opnumber for "readpipe" at -e line 1. $ bleadperl -wle 'print prototype"CORE::readpipe"' $

So an immediate observation is that -X are still "broken" (in Gabriel's own words, which thus I will take for absolutely true, and literally!) in 5.10.0 and I don't have the slightest idea in blead. Furthermore, I don't have the slightest idea of which is the beast behind them: if you check the rest of the thread @ clpmisc then you'll see that I tried with stat but evidence is it's not what "I" (actually, I'm just trying to help someone, but the matter became intriguing for me too...) was after:

actarus:~/test [13:02:32]$ ls foo.pl actarus:~/test [13:02:35]$ cat foo.pl #!/usr/bin/perl use strict; use warnings; my %file; BEGIN { no strict 'refs'; *{'CORE::GLOBAL::stat'} = sub { warn "trying mocked stat()\n"; (my $f)=@_; CORE::stat( @_ && !ref($f) && exists $file{$f} ? $0 : @_ ); }; } use Test::More qw(no_plan); $file{foo} = 1; ok( (scalar stat $_) => "file $_ exists") for qw/foo bar/; ok( (-e $_) => "file $_ exists") for qw/foo bar/; __END__ actarus:~/test [13:02:38]$ ./foo.pl trying mocked stat() ok 1 - file foo exists trying mocked stat() not ok 2 - file bar exists # Failed test 'file bar exists' # at ./foo.pl line 21. not ok 3 - file foo exists # Failed test 'file foo exists' # at ./foo.pl line 22. not ok 4 - file bar exists # Failed test 'file bar exists' # at ./foo.pl line 22. 1..4 # Looks like you failed 3 tests of 4.
--
If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://720687]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-19 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found