17
Scatole nere

Scatole Nere

Embed Size (px)

DESCRIPTION

Lightning talk showing a couple of Perl debugging techniques

Citation preview

Page 1: Scatole Nere

Scatolenere

Page 2: Scatole Nere
Page 3: Scatole Nere
Page 4: Scatole Nere
Page 5: Scatole Nere

Page 6: Scatole Nere

☠ARR!!!

Page 7: Scatole Nere

sub foo

Page 8: Scatole Nere

sub foouse Foo;

...foo();

Page 9: Scatole Nere

{ no strict; no warnings; *{ "Foo::foo" } = sub { print "arrrr!\n"; }}

Page 10: Scatole Nere

$foo_instance->foo();

Page 11: Scatole Nere

sub foo { my $this = shift; ...}

Page 12: Scatole Nere

foo( $foo_instance );

Page 13: Scatole Nere

Hook::LexWrap

Page 14: Scatole Nere

use Foo;use Hook::LexWrap;

wrap Foo::foo, pre => sub { print "Ora chiamo foo...\n" } , post => sub { print "Ho appena chiamato foo().\n" };

Page 15: Scatole Nere

{ wrap Foo::foo, pre => sub { print "Ora chiamo foo...\n" } , post => sub { print "Ho appena chiamato foo().\n" };}

Page 16: Scatole Nere

Page 17: Scatole Nere