File: Module.pm

package info (click to toggle)
libautodie-perl 2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 528 kB
  • ctags: 305
  • sloc: perl: 4,012; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 322 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package Some::Module;
use strict;
use warnings;
use base qw(Exporter);

our @EXPORT_OK = qw(some_sub);

# This is an example of a subroutine that returns (undef, $msg)
# to signal failure.

sub some_sub {
    my ($arg) = @_;

    if ($arg) {
        return (undef, "Insufficient credit");
    }

    return (1,2,3);
}

1;