in reply to Re^3: Interfaces for the masses!
in thread Interfaces for the masses!

But under no circumstances are you ever going to write a UNIVERSAL::something module because it corrupts every other module loaded and results in many people hating you.

Me included.

Every UNIVERSAL::foo module is a mistake, and a failure to solve a problem more elegantly.

There's lots of modules that provide "standard" interfaces, like IO::Socket.

And when I want to act like one, implement the needed methods and then add
sub isa { $_[1] eq 'IO::Socket' ? 1 : shift->SUPER::isa(@_); }
Which makes me ->isa('IO::Socket') without having to have thier implementations as my parent methods.

Replies are listed 'Best First'.
Re^5: Interfaces for the masses!
by diotalevi (Canon) on Mar 28, 2006 at 03:45 UTC

    Oh bravo for saying that. I wish I'd remembered to include all those caveats.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊