in reply to mocking overloading filetest operator callback -f -d -e -X

A Super Search on “Operation """"” finds this 2009 thread: overload op requires stringify overload ?? Applying Bloodnok’s “fix of sorts” —

#! perl -- BEGIN { package OOO; sub new { my( $pkg, $path ) = @_; bless \$path, $pkg; } sub filetest { warn "its fake @_\n"; 'fake' } use overload '-X' => \&filetest, fallback => 1; $INC{'OOO.pm'} = __FILE__; } use strict; use warnings; use OOO; -f OOO->new('.');

gives:

22:15 >perl 804_SoPW.pl its fake OOO=SCALAR(0x1c15434) f 22:19 >

Is that what you were wanting?

Anyway, hope it helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,