Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 845951 Details for
Bug 1048708
Module::Pluggable ignores single-letter-named package names
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Upstream fix
Module-Pluggable-4.8-Allow-single-letter-package-names.patch (text/plain), 2.05 KB, created by
Petr Pisar
on 2014-01-06 08:13:45 UTC
(
hide
)
Description:
Upstream fix
Filename:
MIME Type:
Creator:
Petr Pisar
Created:
2014-01-06 08:13:45 UTC
Size:
2.05 KB
patch
obsolete
>From 7872bc27ac7f828a6b53d00717abdf83f2d1866d Mon Sep 17 00:00:00 2001 >From: Simon Wistow <simon@fastly.com> >Date: Tue, 22 Oct 2013 09:32:27 -0700 >Subject: [PATCH] Allow single letter package names >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Petr PÃsaÅ <ppisar@redhat.com> >--- > lib/Module/Pluggable/Object.pm | 2 +- > t/25single_letter_package.t | 42 ++++++++++++++++++++++++++++++++++++++++++ > t/lib/M/X.pm | 7 +++++++ > 3 files changed, 50 insertions(+), 1 deletion(-) > create mode 100755 t/25single_letter_package.t > create mode 100644 t/lib/M/X.pm > >diff --git a/lib/Module/Pluggable/Object.pm b/lib/Module/Pluggable/Object.pm >index 6f7a051..46240a8 100755 >--- a/lib/Module/Pluggable/Object.pm >+++ b/lib/Module/Pluggable/Object.pm >@@ -234,7 +234,7 @@ sub search_paths { > } > my $plugin = join '::', $searchpath, @dirs, $name; > >- next unless $plugin =~ m!(?:[a-z\d]+)[a-z\d]!i; >+ next unless $plugin =~ m!(?:[a-z\d]+)[a-z\d]*!i; > > $self->handle_finding_plugin($plugin, \@plugins) > } >diff --git a/t/25single_letter_package.t b/t/25single_letter_package.t >new file mode 100755 >index 0000000..dd55fff >--- /dev/null >+++ b/t/25single_letter_package.t >@@ -0,0 +1,42 @@ >+#!perl -w >+ >+use strict; >+use FindBin; >+use lib (($FindBin::Bin."/lib")=~/^(.*)$/); >+use Test::More tests => 5; >+ >+my $foo; >+ok($foo = M->new()); >+ >+my @plugins; >+my @expected = qw(M::X); >+ok(@plugins = sort $foo->plugins); >+ >+ >+ >+is_deeply(\@plugins, \@expected, "is deeply"); >+ >+@plugins = (); >+ >+ok(@plugins = sort M->plugins); >+ >+ >+ >+ >+is_deeply(\@plugins, \@expected, "is deeply class"); >+ >+ >+ >+package M; >+ >+use strict; >+use Module::Pluggable search_path => "M"; >+ >+ >+sub new { >+ my $class = shift; >+ return bless {}, $class; >+ >+} >+1; >+ >diff --git a/t/lib/M/X.pm b/t/lib/M/X.pm >new file mode 100644 >index 0000000..77f8f58 >--- /dev/null >+++ b/t/lib/M/X.pm >@@ -0,0 +1,7 @@ >+package M::X; >+ >+use strict; >+ >+sub new { return bless {}, $_[0]; } >+sub frobnitz {} >+1; >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1048708
: 845951