-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Class-Tiny-527c: no strict hashpairs
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
comment: "cperl strict hashpairs" | ||
match: | ||
distribution: "Class-Tiny-1\.006" | ||
perlconfig: | ||
version: "^5\.2[78]" | ||
usecperl: "define" | ||
patches: | ||
- "RURBAN/patches/Class-Tiny-527c.patch" |
11 changes: 11 additions & 0 deletions
11
sources/authors/id/R/RU/RURBAN/patches/Class-Tiny-527c.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -bu ./lib/Class/Tiny.pm~ ./lib/Class/Tiny.pm | ||
--- ./lib/Class/Tiny.pm~ 2017-05-15 10:11:53.000000000 +0200 | ||
+++ ./lib/Class/Tiny.pm 2017-05-15 10:11:27.000000000 +0200 | ||
@@ -30,6 +30,7 @@ | ||
# adapted from Object::Tiny and Object::Tiny::RW | ||
sub create_attributes { | ||
my ( $class, $pkg, @spec ) = @_; | ||
+ BEGIN { strict->unimport('hashpairs') if $] > 5.026 and $^V =~ /c$/; } | ||
my %defaults = map { ref $_ eq 'HASH' ? %$_ : ( $_ => undef ) } @spec; | ||
my @attr = grep { | ||
defined and !ref and /^[^\W\d]\w*$/s |