PackageManager::Base - PackageManager::Virtual compositions with input validation.
version 0.191250
if ( $obj->does('PackageManager::Base') ) { eval { $obj->install() }; print "$@\n" if ($@); # Required option 'name' is not provided... eval { $obj->list( verbose => 'abc' ) }; print "$@\n" if ($@); # Key 'verbose' (abc) is of invalid type... }
A moose role that extends PackageManager::Virtual. It wraps all PackageManager::Virtual functions, validates the parameters and strips them of their names.
All function parameters lose their name and the base function is invoked using a standard parameter array. The order of the parameters are the same as the order they appear in the original method definition. Except for verbose which has the default value 0, omitted optional parameters are undefined.
Daniel Maurice Davis <Daniel.Maurice.Davis@gmail.com>
This software is copyright (c) 2019 by Daniel Maurice Davis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install PackageManager::Virtual, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PackageManager::Virtual
CPAN shell
perl -MCPAN -e shell install PackageManager::Virtual
For more information on module installation, please visit the detailed CPAN module installation guide.