Verby::Action::Stub - An action which just logs debug messages.


Verby documentation Contained in the Verby distribution.

Index


Code Index:

NAME

Top

Verby::Action::Stub - An action which just logs debug messages.

SYNOPSIS

Top

	use Verby::Step::Closure qw/step/;

	my $s = step "Verby::Action::Stub";

DESCRIPTION

Top

This action is good for use when you need to Stub certain actions.

METHODS

Top

do

Sets $c->done.

verify

Returns $c->done.

BUGS

Top

None that we are aware of. Of course, if you find a bug, let us know, and we will be sure to fix it.

CODE COVERAGE

Top

We use Devel::Cover to test the code coverage of the tests, please refer to COVERAGE section of the Verby module for more information.

SEE ALSO

Top

AUTHOR

Top

Yuval Kogman, <nothingmuch@woobling.org>

COPYRIGHT AND LICENSE

Top


Verby documentation Contained in the Verby distribution.

#!/usr/bin/perl

package Verby::Action::Stub;
use Moose;

our $VERSION = "0.05";

with qw/Verby::Action/;

has name => (
	isa => "Str",
	is  => "rw",
	lazy_build => 1,
);

sub _build_name {
	my $self = shift;
	my $class = ref $self;

	$class =~ s/^Verby::Action:://;

	return $class;
}

sub do {
	my ( $self, $c ) = @_;
	$c->done(1);
	$c->logger->debug($self->name . " do");
}

sub verify {
	my ( $self, $c ) = @_;
	$c->logger->debug($self->name . " verify");
	$c->done;
}

__PACKAGE__

__END__