xref: /openbsd-src/gnu/usr.bin/perl/cpan/autodie/t/lib/Some/Module.pm (revision ac9b4aacc1da35008afea06a5d23c2f2dea9b93e)
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