From 6d214d3eb9b6f879f463dc2fb7159de1fbd36438 Mon Sep 17 00:00:00 2001 From: Timofey Potapov Date: Tue, 14 May 2024 18:54:55 +0200 Subject: [PATCH] Updated pod. --- Changes | 6 ++++++ lib/e.pm | 25 ++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 5060bb8..e04bd7e 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,11 @@ Revision history for e +================= +1.05 - 2024-05-14 +================= + +Fixed typos in pod. + ================= 1.04 - 2024-05-14 ================= diff --git a/lib/e.pm b/lib/e.pm index ef484dc..65a9610 100644 --- a/lib/e.pm +++ b/lib/e.pm @@ -20,7 +20,7 @@ e - Unleash the power of e! =cut -our $VERSION = '1.04'; +our $VERSION = '1.05'; =head1 SYNOPSIS @@ -46,12 +46,31 @@ Devel::Peek dump a data structure: Add a trace marker: - perl -Me -e 'dd {' perl -Me -e 'sub f1 { trace } sub f2 { f1 } f2' Watch a reference for changes: - perl -Me -e 'my $v = {}; sub f1 { watcg( $v ) } sub f2 { f1; $v->{a} = 1 } f2' + perl -Me -e 'my $v = {}; sub f1 { watch( $v ) } sub f2 { f1; $v->{a} = 1 } f2' + + perl -Me -e ' + package A { + use e; + my %h = ( aaa => 111 ); + + watch(\%h); + + sub f1 { + $h{b} = 1; + } + + sub f2 { + f1(); + delete $h{aaa}; + } + } + + A::f2(); + ' Launch the Runtime::Debugger: