File::Tasks::Task - Base class for File::Tasks tasks


File-Tasks documentation Contained in the File-Tasks distribution.

Index


Code Index:

NAME

Top

File::Tasks::Task - Base class for File::Tasks tasks

DESCRIPTION

Top

The File::Tasks::Task class provides a base class for the various types of tasks.

By default, it provides a new constructor that takes a path.

SUPPORT

Top

Bugs should be reported via the CPAN bug tracker at

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Tasks

For other issues, contact the author.

AUTHOR

Top

Adam Kennedy <adamk@cpan.org>, http://ali.as/

COPYRIGHT

Top


File-Tasks documentation Contained in the File-Tasks distribution.

package File::Tasks::Task;

# See POD at end for docs

use strict;
use overload 'bool' => sub () { 1 };
use overload '""'   => 'path';

use vars qw{$VERSION};
BEGIN {
	$VERSION = '0.07';	
}





#####################################################################
# Constructor and Accessors

sub new {
	my $class  = shift;
	my $path   = defined $_[1] ? $_[1] : return undef;
	bless { path => $path }, $class;
}

sub path { $_[0]->{path} }

1;

__END__