#use Sub::Exporter; # -setup => { exports => ['foo'] };
sub
foo {
"FFFFFFFFOOOOOO\n"
;
}
}
{
#use Sub::Exporter -setup => { exports => [ 'baz' ] };
[1,2]->
push
(2);
croak
'jei'
;
#use import 'Moose';
#BEGIN { require Moose; Moose->import(); require Moose::Autobox; Moose::Autobox->import() }
#use Moose;
#use Moose::Autobox;
has
'name'
=> (
is
=>
'rw'
,
isa
=>
'Str'
);
sub
baz {
my
$a
= [1,2,3];
$a
->
push
(4);
return
"BAZ="
.
$a
;
}
}
{
try
{ [1,2]->
push
(2) }
catch
{
'try-catch ok'
};
}
{
[1,2]->
push
(2);
}
{
[1,2]->
push
(2);
}
{
#use sugar 'goo';
$x
= 1;
"X=$x"
;
}
package
main;
Joe::baz();