Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -- BEGIN { package OOO; sub new { my( $pkg, $path ) = @_; bless \$path, $pkg; } sub filetest { warn "its fake @_\n"; 'fake' } use overload '-X' => \&filetest; $INC{'OOO.pm'} = __FILE__; } use strict; use warnings; use OOO; -f OOO->new('.'); __END__ Operation """": no method found, argument in overloaded package OOO at + - line 6.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mocking overloading filetest operator callback -f -d -e -X
by Athanasius (Archbishop) on Dec 18, 2013 at 12:24 UTC | |
|
Re: mocking overloading filetest operator callback -f -d -e -X
by kcott (Archbishop) on Dec 18, 2013 at 14:31 UTC |