in reply to Re: Smallish mock objects
in thread Smallish mock objects

Oog. I didn't know you could bless globs

( Globs Glob refs ) are blessable and globs are tieable. Similarly, all IOs are blessed.

>perl -e "open $fh, '-'; print *$fh{IO} IO::Handle=IO(0x22532c) >perl -e "print *STDOUT{IO} IO::Handle=IO(0x225cfc)

That means all IOs can be used as objects.

>perl -e "STDOUT->flush() Can't locate object method "flush" via package "IO::Handle" >perl -e "use IO::Handle; STDOUT->flush()