File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,8 @@ my $bom
114
114
sub hide_from_pause {
115
115
my ( $self , $content , $file_name ) = @_ ;
116
116
return 0 if defined ($file_name ) && $file_name =~ m {\. pm\. PL\z } ;
117
- my $pkg = $self -> name;
117
+ my $pkg = $self -> name;
118
+ my $pkg_match = join q[ (?:::|')] , map quotemeta , split m { ::} , $pkg ;
118
119
119
120
# This regexp is *almost* the same as $PKG_REGEXP in Module::Metadata.
120
121
# [b] We need to allow/ignore a possible BOM since we read in binary mode.
@@ -128,7 +129,7 @@ sub hide_from_pause {
128
129
[\h\{ ;]* # intro chars on a line [s]
129
130
package # the word 'package'
130
131
\h + # whitespace [s]
131
- (\Q $pkg \E ) # a package name [p]
132
+ ($pkg_match ) # the package name [p]
132
133
(\h + v?[0-9._]+)? # optional version number (preceded by whitespace) [v]
133
134
\h * # optional whitesapce [s]
134
135
[;\{ ] # semicolon line terminator or block start
You can’t perform that action at this time.
0 commit comments