Scott Penrose

Moose

Scott is an expert software developer with over 30 years experience, specialising in education, automation and remote data.

The beginning - I am porting a large project (as part of a refactor) to Moose... I will keep a list of modules I use here, and possibly issues...

Daemon & Command lines

The project runs as a daemon from the command line.

Sub types

I will need to do some advanced types, we should do as much validation as possible.


Issues

Complex validation

I have two parameters - 'path' and 'script' - where 'path' is optional and has a default, and 'script' should be an executable in 'path'. But how do we check?

#!Perl
subtype 'script'
 => where { -x "$path/$_" };

but where to get $path...

  • Perl