Verby::Action::Run::Unconditional - A default C<verify> method for


Verby documentation Contained in the Verby distribution.

Index


Code Index:

NAME

Top

Verby::Action::Run::Unconditional - A default verify method for Verby::Action::Run based actions.

SYNOPSIS

Top

	pakcage MyAction;

	with qw/
		Verby::Action::Run
		Verby::Action::Run::Unconditional
	/;

	sub do {
		my ( $self, $c ) = @_;

		$c->create_poe_session( ... );
	}

	# no need to supply ->verify

DESCRIPTION

Top

This convenience role makes it easy to write Verby::Action::Run based actions that return false from verify until they have actually been run, at which point they return true unconditionally.


Verby documentation Contained in the Verby distribution.

#!/usr/bin/perl

package Verby::Action::Run::Unconditional;
use Moose::Role;

with qw/Verby::Action::Run/;

sub verify {
	my ( $self, $c ) = @_;
	$c->program_finished;
}

__PACKAGE__;

__END__