xref: /openbsd-src/gnu/usr.bin/perl/cpan/autodie/t/lib/Some/Module.pm (revision 898184e3e61f9129feb5978fad5a8c6865f00b92)
1package Some::Module;
2use strict;
3use warnings;
4use base qw(Exporter);
5
6our @EXPORT_OK = qw(some_sub);
7
8# This is an example of a subroutine that returns (undef, $msg)
9# to signal failure.
10
11sub some_sub {
12    my ($arg) = @_;
13
14    if ($arg) {
15        return (undef, "Insufficient credit");
16    }
17
18    return (1,2,3);
19}
20
211;
22