use
5.006;
BEGIN {
$VERSION
=
'1.12'
;
}
name
filename
working_dir
}
;
sub
new {
my
$self
=
shift
->SUPER::new(
@_
);
unless
( _STRING(
$self
->name) ) {
croak(
"Missing or invalid name param"
);
}
unless
( _STRING(
$self
->filename) ) {
croak(
"Missing or invalid filename param"
);
}
if
(
defined
$self
->working_dir and ! _STRING(
$self
->working_dir) ) {
croak(
"Invalid working_dir param"
);
}
return
$self
;
}
sub
as_string {
my
$self
=
shift
;
return
join
(
'; '
,
"Name: \""
.
$self
->name .
"\""
,
"Filename: \""
.
$self
->filename .
"\""
,
defined
(
$self
->working_dir)
? (
"WorkingDir: \""
.
$self
->working_dir .
"\""
)
: (),
);
}
1;