Thanks to
Stack Overflow, I can move forward. Stupid examples below.
test.pl
-
- use 5.010 ;
- use strict ;
- use warnings ;
-
-
- use Dumb ':all' ;
-
- my_dumb_function() ;
#!/usr/bin/perl
use 5.010 ;
use strict ;
use warnings ;
#use Dumb::Database ':all' ;
use Dumb ':all' ;
my_dumb_function() ;
Dumb.pm
- package Dumb ;
- use 5.010 ;
- use strict;
- use warnings;
- use Exporter qw(import);
- use lib '/home/jacoby/lib' ;
- use Dumb::Database ':all' ;
-
- our %EXPORT_TAGS = ('all' => [ qw(
- my_dumb_function
- ) ],
- );
- our @EXPORT_OK = ( @{$EXPORT_TAGS{'all'}} );
- our $VERSION = 0.0.1;
-
- 1;
package Dumb ;
use 5.010 ;
use strict;
use warnings;
use Exporter qw(import);
use lib '/home/jacoby/lib' ;
use Dumb::Database ':all' ;
our %EXPORT_TAGS = ('all' => [ qw(
my_dumb_function
) ],
);
our @EXPORT_OK = ( @{$EXPORT_TAGS{'all'}} );
our $VERSION = 0.0.1;
1;
Dumb/Database.pm
- package Dumb::Database ;
- use 5.010 ;
- use strict;
- use warnings;
-
- use Exporter qw(import);
- our %EXPORT_TAGS = ('all' => [ qw(
- my_dumb_function
- ) ],
- );
- our @EXPORT_OK = ( @{$EXPORT_TAGS{'all'}} );
-
- sub my_dumb_function {
- say 'dumb' ;
- }
- 1;
package Dumb::Database ;
use 5.010 ;
use strict;
use warnings;
use Exporter qw(import);
our %EXPORT_TAGS = ('all' => [ qw(
my_dumb_function
) ],
);
our @EXPORT_OK = ( @{$EXPORT_TAGS{'all'}} );
sub my_dumb_function {
say 'dumb' ;
}
1;
No comments:
Post a Comment