Games::Sudoku::Component::Result
use Games::Sudoku::Component::Result; # verbose my $verbose = 1; sub some_function { my $return_code = 1; if ($verbose) { return Games::Sudoku::Component::Result->new( result => $code, reason => 'more descriptive error message', ); } else { return $code; } } # Then, check the result. if (my $result = &some_function) { print ref $result ? $result->{reason} : 'something has happened'; }
This module is mainly for debugging. Use this for a normal scalar return code, and you can get more detailed or additional information about it.
Options are:
Something you'd like to return.
Debug message, error code, or something like that.
If there is only one argument, it is supposed to be a result code.
Returns the values stored when the object was created, respectively.
Kenichi Ishigaki, <ishigaki@cpan.org>
Copyright (C) 2006 by Kenichi Ishigaki
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Games::Sudoku::Component, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Sudoku::Component
CPAN shell
perl -MCPAN -e shell install Games::Sudoku::Component
For more information on module installation, please visit the detailed CPAN module installation guide.