Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is this a bug?#!/usr/bin/perl -- use strict; use warnings; eval { STDOUT->print( "can print ", UNIVERSAL::can( \*STDOUT, 'print' ), +"\n" ); 1; } or print "$@\n"; require IO::Handle; print "can print ", STDOUT->can('print') || '', "\n"; print "can print ", *STDOUT{IO}->can('print'), "\n"; __END__ Can't locate object method "print" via package "IO::Handle" at - line +7. can print can print CODE(0x188ae88)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IO::Handle UNIVERSAL::can STDOUT print
by ikegami (Patriarch) on Sep 04, 2009 at 06:10 UTC | |
by Anonymous Monk on Sep 04, 2009 at 06:22 UTC | |
by ikegami (Patriarch) on Sep 04, 2009 at 06:25 UTC | |
by Anonymous Monk on Sep 04, 2009 at 06:28 UTC | |
by ikegami (Patriarch) on Sep 04, 2009 at 06:37 UTC | |
|