D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
doc
/
perl-Sub-Exporter
/
t
/
lib
/
Test
/
SubExporter
/
Filename :
DashSetup.pm
back
Copy
#!/usr/bin/perl package Test::SubExporter::DashSetup; use strict; use warnings; use Sub::Exporter -setup => { exports => { xyzzy => undef, hello_sailor => \&_hs_gen, }, groups => { default => [ qw(xyzzy hello_sailor) ], sailor => [ xyzzy => undef, hello_sailor => { -as => 'hs_works', game => 'zork3' }, hello_sailor => { -as => 'hs_fails', game => 'zork1' }, ] }, collectors => [ 'defaults' ], }; sub xyzzy { return "Nothing happens." }; sub _hs_gen { my ($class, $name, $arg, $collection) = @_; if (($arg->{game}||'') eq 'zork3') { return sub { return "Something happens!" }; } else { return sub { return "Nothing happens yet." }; } } "y2";
Name
Size
Last Modified
Owner
Permissions
Actions
DashSetup.pm
0.704
KB
October 13 2019 12:14:30
root
0644
Faux.pm
1.655
KB
October 18 2013 3:10:07
root
0644
GroupGen.pm
1.055
KB
October 13 2019 12:14:30
root
0644
GroupGenSubclass.pm
0.39
KB
October 18 2013 3:10:07
root
0644
ObjGen.pm
0.973
KB
October 13 2019 12:14:30
root
0644
s_e.pm
0.752
KB
October 13 2019 12:14:30
root
0644
2017 © D7net | D704T team