On Mon, Sep 26, 2016 at 10:32:11PM +0200, ?var Arnfj?r? Bjarmason wrote: > I've just pushed a smoke-me branch to remote UNIVERSAL::import from > that package, and make its (no)?import a fatal error via a hack to > gv.c: http://perl5.git.perl.org/perl.git/commitdiff/8804321d > > The motivation here is that someone doing "use UNIVERSAL;" in some > module shouldn't make $pkg->can("import") true for any value of $pkg > in your program. > > But technically this does break backwards compatibility without a > deprecation cycle. Because "use UNIVERSAL;" isn't an error today, and > some code on the CPAN redundantly uses that. You'll also break this: use UNIVERSAL; ... if(UNIVERSAL::isa($foo, 'Some::Class')) { ... which is a lot more convenient than checking to see if $foo is blessed, and if it is calling $foo->isa(). That said, it's not a particularly common idiom and I'm happy to change it in my code. -- David Cantrell | Cake Smuggler Extraordinaire "Cynical" is a word used by the naive to describe the experienced. George Hills, in uknotThread Previous | Thread Next