Skip to content

Commit

Permalink
1.15 - Updated "watch" with -methods option.
Browse files Browse the repository at this point in the history
  • Loading branch information
Timofey Potapov committed May 24, 2024
1 parent 58d9e71 commit e45669f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ my $builder = $class->new(
'perl' => '5.016',
'Sub::Util' => '0',
'Runtime::Debugger' => '1.02',
'Data::Trace' => '1.03',
'Data::Trace' => '1.04',
'Tiny::Prof' => '0',
'Mojolicious' => '0',
'YAML::XS' => '0',
Expand Down
7 changes: 7 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Revision history for e

=================
1.15 - 2024-05-24
=================

Updated "watch" with -methods option to make it simple to
watch only specific methods (like "fetch").

=================
1.14 2024-05-24
=================
Expand Down
30 changes: 23 additions & 7 deletions lib/e.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package e;
/ / / / __ \/ / _ \/ __ `/ ___/ __ \/ _ \/ __ /
/ /_/ / / / / / __/ /_/ (__ ) / / / __/ /_/ /
\__,_/_/ /_/_/\___/\__,_/____/_/ /_/\___/\__,_/
=head1 NAME
e - beastmode unleashed
Expand All @@ -34,7 +34,7 @@ use 5.006;
use strict;
use warnings;

our $VERSION = '1.14';
our $VERSION = '1.15';

=head1 SYNOPSIS
Expand Down Expand Up @@ -133,21 +133,37 @@ Enable to analyze code in the process.
Show a stack trace.
trace( $depth=1 )
trace( $depth=1 )
=head2 watch
Watch a reference for changes.
watch( $ref, $depth=3 )
watch( $ref, OPTIONS )
OPTIONS:
-clone => 0, # Will not watch cloned objects.
-methods => "fetch", # Monitor just this method.
-methods => [ "fetch" ], # Same.
-levels => NUM, # How many scope levels to show.
NUM, # Same.
-raw => 1, # Include internal calls.
-NUM, # Same.
-message => STR, # Message to display.
STR, # Same.
=head2 prof
Profile the code from this point on.
my $obj = prof;
...
# $obj goes out of scope and builds results.
my $obj = prof;
...
# $obj goes out of scope and builds results.
=head2 j
Expand Down

0 comments on commit e45669f

Please sign in to comment.