Foo - Example of a module which can optionally use Params::Validate
use Foo my $obj=Foo->new('fred');
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,
To install Module::Optional, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Optional
CPAN shell
perl -MCPAN -e shell install Module::Optional
For more information on module installation, please visit the detailed CPAN module installation guide.