Skip to content

Instantly share code, notes, and snippets.

@toddr
toddr / YAML-Syck-example.patch
Last active August 6, 2020 14:49
Use Devel::PPPort to provide ppport.h
diff --git a/Makefile.PL b/Makefile.PL
index 0416c6f..09c71c9 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,6 +2,9 @@ use 5.006;
use strict;
use warnings;
use ExtUtils::MakeMaker;
+use Devel::PPPort ();
+
@toddr
toddr / say
Created May 21, 2020 17:01
CPAN modules that have incompatibilities with use v5.32.0
A/Acme-Cow/Cow.pm:sub say
A/Acme-Cow/Cow/TextBalloon.pm:sub say
A/Acme-Hospital-Bed/lib/Acme/Hospital/Bed.pm:sub say {
A/Acme-MadokaMagica/lib/Acme/MadokaMagica/TvMembers.pm:sub say {
A/Acme-MilkyHolmes/lib/Acme/MilkyHolmes/Role/HasPersonalColor.pm:sub say {
A/Acme-MomoiroClover/lib/Acme/MomoiroClover/Members/Base.pm:sub say {
A/Acme-Pinoko/lib/Acme/Pinoko.pm:sub say
A/Acme-PrettyCure/lib/Acme/PrettyCure/Role.pm:sub say {
A/Acme-PriPara/lib/Acme/PriPara/MainMembers.pm:sub say {
A/Acme-Want5000trillion/lib/Acme/Want5000trillion.pm:sub say{
@toddr
toddr / compat-perl5.pm
Last active June 30, 2020 14:49
This module enables all features and sets strict and warnings on by default with experimental warnings off. WARNING: this is not the definitive list of what will be in perl 7 but provides a way to test what might break in perl 7 but on 5.30.0
package compat::perl5;
# This helps hint to perl 7+ what level of compatibility this code has with future versions of perl.
# use compat::perl5 should be the first thing in your code. Especially before use strict, warnings, v5.XXX, or feature.
BEGIN {
$] <= 8 or die("This code is incompatible with Perl 8. Please see XXX for more information.");
if ( $] > 6 ) {
warn_quietly_once("This code is being run using Perl $]. It should be updated or may break in Perl 8. See YYY for more information.");
}
@toddr
toddr / gist:d3c90e7a1896e3eb5b3f98ec87b488ba
Last active April 22, 2018 16:03
CPAN x_use_unsafe_inc
A/Acme-CPANAuthors-Nonhuman/META.json: "x_use_unsafe_inc" : 0
A/Acme-CPANAuthors-Nonhuman/META.yml:x_use_unsafe_inc: 0
A/Alien-Build/META.json: "x_use_unsafe_inc" : 0
A/Alien-Build/META.yml:x_use_unsafe_inc: 0
A/Alien-autoconf/META.json: "x_use_unsafe_inc" : 0
A/Alien-autoconf/META.yml:x_use_unsafe_inc: 0
A/Alien-automake/META.json: "x_use_unsafe_inc" : 0
A/Alien-automake/META.yml:x_use_unsafe_inc: 0
A/Alien-gmake/META.json: "x_use_unsafe_inc" : 0
A/Alien-gmake/META.yml:x_use_unsafe_inc: 0
package Z;
use Devel::Peek ();
use overload "+"=>sub {42};
die "fail" unless 42 == bless({}) + 1;
Devel::Peek::Dump \%Z::;
use Inline C => <<END;
void foo(SV* targ) {
if (!SvOK(targ)) return;
if (SvROK(targ)) targ = SvRV(targ);