On Thu, Jan 30, 2014 at 10:36:19PM -0500, D Perrett wrote:
> > use t::lib::MyPackage;
> Nice tip!

That has a few caveats though.

Your %INC will be a bit screwy, which may matter to some code. And it
will fail to run MyPackage->import(), because t::lib::MyPackage::import
doesn't exist.

  $ cat t/lib/MyPackage.pm
  package MyPackage;
  sub import { print "import() was called\n" }
  1;

  $ perl -e 'use t::lib::MyPackage;'

  $ perl -e 'use lib "t/lib";use MyPackage;'
  import() was called

There may be other hidden weirdness that I've forgotten about.

-- 
David Cantrell | Godless Liberal Elitist

    Seven o'clock in the morning is something that
    happens to those less fortunate than me

Reply via email to