Skip to content

Instantly share code, notes, and snippets.

Avatar

Graham Knop haarg

View GitHub Profile
View unconstant.pm
package unconstant;
use strict;
use warnings;
use constant;
my $const_import = \&constant::import;
my $installed;
sub import {
return if $installed;
my %import_wrappers;
View gist:f9f25aafafe864cd400a4b82b97ec0cb
sub _is_const {
my $sub = shift;
my $proto = prototype $sub;
if (defined $proto && $proto eq '') {
local *_test_const = $sub;
local $@;
local $SIG{__DIE__};
return !eval {
use warnings FATAL => 'all';
undef &_test_const;
View nopaste
diff --git i/lib/File/Slurp.pm w/lib/File/Slurp.pm
index 26e327b..8e977bb 100644
--- i/lib/File/Slurp.pm
+++ w/lib/File/Slurp.pm
@@ -86,7 +86,7 @@ sub read_file {
}
else {
# to keep with the old ways, read in :raw by default
- unless (open $fh, "<:raw", $file_name) {
+ unless (open $fh, "<", $file_name) {
View nopaste
diff --git i/lib/Dist/Zilla/Role/Git/StringFormatter.pm w/lib/Dist/Zilla/Role/Git/StringFormatter.pm
index b37f298..89643c6 100644
--- i/lib/Dist/Zilla/Role/Git/StringFormatter.pm
+++ w/lib/Dist/Zilla/Role/Git/StringFormatter.pm
@@ -28,6 +28,7 @@ package Dist::Zilla::Role::Git::StringFormatter;
t => sub { $_[0]->zilla->is_trial
? (defined $_[1] ? $_[1] : '-TRIAL') : '' },
v => sub { $_[0]->zilla->version },
+ V => sub { my $v = $_[0]->zilla->version; $v =~ s/\Av//; $v },
},
View nopaste
diff --git i/lib/Sub/Quote.pm w/lib/Sub/Quote.pm
index e6de9db..183c86b 100644
--- i/lib/Sub/Quote.pm
+++ w/lib/Sub/Quote.pm
@@ -14,6 +14,7 @@ package Sub::Quote;
BEGIN {
*_HAVE_IS_UTF8 = defined &utf8::is_utf8 ? sub(){1} : sub(){0};
*_HAVE_PERLSTRING = defined &B::perlstring ? sub(){1} : sub(){0};
+ *_BAD_BACKSLASH_ESCAPE = _HAVE_PERLSTRING() && "$]" == 5.010_000 ? sub(){1} : sub(){0};
}
View xc-accessor-comparison.pl
use strict;
use warnings;
use Benchmark::Dumb qw(cmpthese);
use Class::Accessor::Inherited::XS ();
use Class::XSAccessor ();
BEGIN {
package CXSA;
sub new { my $class = shift; bless {@_}, $class }
View qr-generate.pl
use strict;
use warnings;
{
package QROverload;
use overload 'qr' => sub {
my $self = shift;
qr/(??{ $self->_as_qr($_) })/;
};
View gist:b4e4fbc190bb9eac4845900a939ec66b
Clipboard
Convert-ASN1
Dancer
Data-Dump-Streamer
Data-Localize
Data-MessagePack
Devel-CallParser
Devel-QuickCover
Diff-LibXDiff
Getopt-Euclid
View CONTRIBUTING.md

Contributing

Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code.

Contact

If you have any issues or questions, you can reach out to the other developers in a number of ways:

View nopaste
diff --git i/Makefile.PL w/Makefile.PL
index 87c883c9c..3a9a77759 100644
--- i/Makefile.PL
+++ w/Makefile.PL
@@ -42,7 +42,7 @@ BEGIN
my %args = MMHelper::mm_args();
$args{clean}{FILES} = join(' ', ($args{clean}{FILES} || ()),
- 't/recipes/{a,[c-zA-Z]}*', 't/recipes/basics_[a-fh-zA-Z]*',
+ (grep !/basics_genome_overloadingsubtypesandcoercion\.t\z/, glob('t/recipes/*')),
You can’t perform that action at this time.