]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DBase.pm
[project @ 2000-03-18 01:40:03 by gecko]
[debbugs.git] / Debbugs / DBase.pm
1 package Debvote::Rank;  # assumes Some/Module.pm
2
3 use strict;
4
5 BEGIN {
6         use Exporter   ();
7         use vars       qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
8
9         # set the version for version checking
10         $VERSION     = 1.00;
11
12         @ISA         = qw(Exporter);
13         @EXPORT      = qw(&func1 &func2 &func4);
14         %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
15
16         # your exported package globals go here,
17         # as well as any optionally exported functions
18         @EXPORT_OK   = qw($Var1 %Hashit &func3);
19 }
20
21 use vars      @EXPORT_OK;
22
23 # non-exported package globals go here
24 use vars      qw(@more $stuff);
25
26 # initialize package globals, first exported ones
27 $Var1   = '';
28 %Hashit = ();
29
30 # then the others (which are still accessible as
31 # $Some::Module::stuff)
32 $stuff  = '';
33 @more   = ();
34
35 # all file-scoped lexicals must be created before
36 # the functions below that use them.
37
38 # file-private lexicals go here
39 my $priv_var    = '';
40 my %secret_hash = ();
41
42 # here's a file-private function as a closure,
43 # callable as &$priv_func;  it cannot be prototyped.
44 my $priv_func = sub {
45 # stuff goes here.
46 };
47
48 # make all your functions, whether exported or not;
49 # remember to put something interesting in the {} stubs
50 sub func1      {}    # no prototype
51 sub func2()    {}    # proto'd void
52 sub func3($$)  {}    # proto'd to 2 scalars
53
54 # this one isn't exported, but could be called!
55 sub func4(\%)  {}    # proto'd to 1 hash ref
56
57 END { }       # module clean-up code here (global destructor)