Aspect::Library::Breakpoint - A breakpoint aspect


Aspect documentation Contained in the Aspect distribution.

Index


Code Index:

NAME

Top

Aspect::Library::Breakpoint - A breakpoint aspect

SYNOPSIS

Top

  use Aspect;

  aspect Breakpoint => call qr/^Foo::refresh/;

  my $f1 = Foo->refresh_foo;
  my $f2 = Foo->refresh_bar;

  # The debugger will go into single statement mode for both methods

DESCRIPTION

Top

Aspect::Library::Breakpoint is a reusable aspect for implementing breakpoints in the debugger in patterns that are more complex than the native debugger supports.

AUTHORS

Top

Adam Kennedy <adamk@cpan.org>

COPYRIGHT

Top


Aspect documentation Contained in the Aspect distribution.

package Aspect::Library::Breakpoint;

use strict;
use warnings;
use Aspect::Library        ();
use Aspect::Advice::Before ();

our $VERSION = '1.01';
our @ISA     = 'Aspect::Library';

sub get_advice {
	my $self = shift;
	Aspect::Advice::Before->new(
		lexical  => $self->lexical,
		pointcut => $_[0],
		code     => sub {
			no warnings;
			$DB::single = 1;
		},
	);
}

1;

__END__