Object::Wrapper::Fork::DBI_stubs -- croak on call if DBI is not avaiable and the caller is used.
# DBI is not installed. package My; use parent qw( Object::Wrapper::Fork::DBI ); # so far no harm, no foul: code that wants to # test the Fork::DBI module can do so. # # calling connect, however, croaks since DBI # is not available. my $dbh = My->connect( $dsn, @blah );
This avoids requiring a hard-wired dependency on DBI for users who do not need O::W::Fork::DBI.
Fork::DBI eval's its "use DBI" and carps if there is no DBI installed. Calls to "connect" croak in the Fork::DBI class.
This saves testing for DBI being installed on every single call to any of the Fork::DBI methods.
Steven Lembark <lembark@wrkhors.com>
Copyright (C) 2009 Steven Lembark. This module is released under the same terms as Perl-5.10.0 itself.
To install Object::Wrapper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Object::Wrapper
CPAN shell
perl -MCPAN -e shell install Object::Wrapper
For more information on module installation, please visit the detailed CPAN module installation guide.