root/lang/perl/Util-Any/trunk/t/lib/UtilExporter.pm @ 32282

Revision 32282, 0.6 kB (checked in by ktat, 6 years ago)

support Sub::Exporter
support some of exporting ways from Sub::Exporter.
refactor code.

Line 
1package UtilExporter;
2
3use strict;
4use Clone qw/clone/;
5
6use Util::Any -Exporter;
7
8our @EXPORT = qw/hello/;
9our @EXPORT_OK = qw/askme hello hi/;
10our %EXPORT_TAGS = (
11                    'greet' => [qw/hello hi/],
12                    'uk'    => [qw/hello/],
13                    'us'    => [qw/hi/],
14                    'hello' => [qw/hello_name hello_where/],
15                   );
16
17our $Utils = clone $Util::Any::Utils;
18$Utils->{l2s} = [
19                 ['List::Util', '', [qw(first min minstr max maxstr sum)]],
20                ];
21$Utils->{-hello} = ['exampleHello'];
22
23sub hello { "hello there" }
24sub askme { "what you will" }
25sub hi    { "hi there" }
26
271;
Note: See TracBrowser for help on using the browser.