Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
schwern opened this issue Mar 28, 2013 · 0 comments
Open

Comments

@schwern
Copy link
Contributor

schwern commented Mar 28, 2013

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
Projects
None yet
Development

No branches or pull requests

1 participant