xref: /openbsd-src/gnu/usr.bin/perl/cpan/autodie/t/lib/Some/Module.pm (revision b8851fcc53cbe24fd20b090f26dd149e353f6174)
1b39c5158Smillertpackage Some::Module;
2b39c5158Smillertuse strict;
3b39c5158Smillertuse warnings;
4*b8851fccSafresh1use Exporter 5.57 'import';
5b39c5158Smillert
6b39c5158Smillertour @EXPORT_OK = qw(some_sub);
7b39c5158Smillert
8b39c5158Smillert# This is an example of a subroutine that returns (undef, $msg)
9b39c5158Smillert# to signal failure.
10b39c5158Smillert
11b39c5158Smillertsub some_sub {
12b39c5158Smillert    my ($arg) = @_;
13b39c5158Smillert
14b39c5158Smillert    if ($arg) {
15b39c5158Smillert        return (undef, "Insufficient credit");
16b39c5158Smillert    }
17b39c5158Smillert
18b39c5158Smillert    return (1,2,3);
19b39c5158Smillert}
20b39c5158Smillert
21b39c5158Smillert1;
22