Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow loading perl5i::2 twice in the same namespace without warning. #251

Open
schwern opened this Issue · 0 comments

1 participant

@schwern
Owner

If you load perl5i::2 twice in the same namespace, you'll get warnings.

use perl5i::2;
use perl5i::2;
Subroutine main::CLASS redefined at /Users/schwern/perl5/perlbrew/perls/perl-5.16.2-threads/lib/site_perl/5.16.2/CLASS.pm line 20.
Prototype mismatch: sub main::open (*;$@) vs none at /Users/schwern/perl5/perlbrew/perls/perl-5.16.2-threads/lib/site_perl/5.16.2/perl5i/2/UNIVERSAL.pm line 23.

Eliminate those warnings. The first one is a fairly straightforward double export. CLASS.pm doesn't use Exporter. Best to fix that in CLASS.pm.

$ perl -wle 'use CLASS; use CLASS'
Subroutine main::CLASS redefined at /Users/schwern/perl5/perlbrew/perls/perl-5.16.2-threads/lib/site_perl/5.16.2/CLASS.pm line 20.

The second is part of the interaction between use utf8::all and use autodie both want open.

Originally reported in #250.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.