The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Foo - Example of a module which can optionally use Params::Validate

SYNOPSYS

  use Foo

  my $obj=Foo->new('fred');

DESCRIPTION

This is an example of how you would write a module that optionally uses Params::Validate. If the target machine has Params::Validate installed, the user gets the benefit of full blown parameter validation.

If not, the code will still work, but callers may pass in unexpected data types that cause the module to blow in unexpected ways,