Aspect

 view release on metacpan or  search on metacpan

lib/Aspect/Advice/Around.pm  view on Meta::CPAN

	# Pointcuts using "throwing" are irrelevant in before advice
	if ( $pointcut->match_contains('Aspect::Pointcut::Throwing') ) {
		return 'The pointcut throwing is illegal when used by around advice';
	}

	# Pointcuts using "throwing" are irrelevant in before advice
	if ( $pointcut->match_contains('Aspect::Pointcut::Returning') ) {
		return 'The pointcut returning is illegal when used by around advice';
	}

	$self->SUPER::_validate(@_);
}

1;

=pod

=head1 NAME

Aspect::Advice::Around - Execute code both before and after a function

lib/Aspect/Advice/Before.pm  view on Meta::CPAN

	# Pointcuts using "throwing" are irrelevant in before advice
	if ( $pointcut->match_contains('Aspect::Pointcut::Throwing') ) {
		return 'The pointcut throwing is illegal when used by before advice';
	}

	# Pointcuts using "throwing" are irrelevant in before advice
	if ( $pointcut->match_contains('Aspect::Pointcut::Returning') ) {
		return 'The pointcut returning is illegal when used by before advice';
	}

	$self->SUPER::_validate(@_);
}

1;

__END__

=pod

=head1 NAME

lib/Aspect/Pointcut/And.pm  view on Meta::CPAN

	}

	# Collapse nested and statements at constructor time so we don't have
	# to do so multiple times later on during currying.
	while ( scalar grep { $_->isa('Aspect::Pointcut::And') } @parts ) {
		@parts = map {
			$_->isa('Aspect::Pointcut::And') ? @$_ : $_
		} @parts;
	}

	$class->SUPER::new(@parts);
}





######################################################################
# Weaving Methods

sub compile_weave {

lib/Aspect/Pointcut/Not.pm  view on Meta::CPAN

# Constructor

sub new {
	my $class = shift;

	# Check the thing we are negating
	unless ( Params::Util::_INSTANCE($_[0], 'Aspect::Pointcut') ) {
		Carp::croak("Attempted to apply pointcut logic to non-pointcut '$_[0]'");
	}

	$class->SUPER::new(@_);
}





######################################################################
# Weaving Methods

sub compile_weave {

lib/Aspect/Pointcut/Or.pm  view on Meta::CPAN

	}

	# Collapse nested or statements at constructor time so we don't have
	# to do so multiple times later on during currying.
	while ( scalar grep { $_->isa('Aspect::Pointcut::Or') } @parts ) {
		@parts = map {
			$_->isa('Aspect::Pointcut::Or') ? @$_ : $_
		} @parts;
	}

	$class->SUPER::new(@parts);
}





######################################################################
# Weaving Methods

sub compile_weave {



( run in 0.282 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )