This file contains hidden or 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
| package Foo; | |
| use overload '&{}' => sub { \&call_cplusplus }; | |
| sub call_cplusplus { warn 42 } | |
| sub new {return bless sub {}, shift} | |
| package main; | |
| my $obj = Foo->new; | |
| use Scalar::Util qw/reftype/; | |
| warn reftype $obj; | |
| $obj->(); |
This file contains hidden or 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
| SeaBIOS (version rel-1.8.0-48-g1d9e87b-dirty-20180223_211656-fangorn) | |
| No Xen hypervisor found. | |
| enabling shadow ram | |
| Running on QEMU (q35) | |
| Running on KVM | |
| Add to e820 map: 00000000 20000000 1 | |
| Add to e820 map: fffc0000 00040000 2 | |
| RamSize: 0x20000000 [cmos] | |
| malloc preinit | |
| Add to e820 map: 000a0000 00050000 -1 |
This file contains hidden or 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
| SeaBIOS (version rel-1.8.0-48-g1d9e87b-dirty-20180223_211656-fangorn) | |
| No Xen hypervisor found. | |
| enabling shadow ram | |
| Running on QEMU (q35) | |
| Running on KVM | |
| Add to e820 map: 00000000 20000000 1 | |
| Add to e820 map: fffc0000 00040000 2 | |
| RamSize: 0x20000000 [cmos] | |
| malloc preinit | |
| Add to e820 map: 000a0000 00050000 -1 |
This file contains hidden or 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
| use ExtUtils::MakeMaker; | |
| use ExtUtils::Depends; | |
| my $package = ExtUtils::Depends->new('Foo', 'XS::Object::Magic'); | |
| WriteMakefile( | |
| NAME => 'Foo', | |
| $package->get_makefile_vars(), | |
| ); |
This file contains hidden or 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
| perl -e 'sub foo {warn 42} $glob = $main::{foo}; $glob->(); *$glob{CODE}->()' | |
| perl -e 'our $foo; sub foo {warn 42} $glob = $main::{foo}; $glob->(); *$glob{CODE}->()' |
This file contains hidden or 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
| 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); |
This file contains hidden or 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
| TEST_JOBS 16 32 72 | |
| blead 2:34 2:44 2:55 | |
| khw-harness 2:48 2:31 3:09 |
This file contains hidden or 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
| use Devel::Peek; | |
| #use Data::Printer use_prototypes => 0, return_value => 'pass'; | |
| #use Data::Printer use_prototypes => 1, return_value => 'pass'; | |
| my $foo = \*STDIN; | |
| Dump(p $foo); | |
| with use_prototypes => 0: | |
| *main::STDIN (read/write, layers: unix perlio) | |
| SV = PVGV(0x7f8e3a91aea0) at 0x7f8e3aa25f30 |
This file contains hidden or 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
| use mro 'c3'; | |
| package Foo { | |
| our @ISA = qw/Bar/; | |
| use Sub::Name qw/subname/; | |
| *foo = \&Bar::foo; | |
| subname bar => \&foo; | |
| }; | |
| package Bar { |