Skip to content

Commit

Permalink
1.05 - Fixed pod.
Browse files Browse the repository at this point in the history
  • Loading branch information
Timofey Potapov committed May 14, 2024
1 parent 6d214d3 commit a6bf9f8
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,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:

Expand Down

0 comments on commit a6bf9f8

Please sign in to comment.