|
I now have this working swimmingly. I am using it for the 'Type' subroutines in the %init_args hash mostly.
$ cat Top.pm
package Top;
use Object::InsideOut 'Exporter';
BEGIN {
our @EXPORT_OK = qw(_check_foo);
}
sub _foo : Restricted {
return 1;
}
1;
$ cat Top/Middle.pm
package Top::Middle;
use Object::InsideOut 'Exporter', 'Top' => [ qw(_check_foo) ],;
BEGIN {
our @EXPORT_OK = qw(_check_foo);
}
my @info :Field('Standard' => 'info');
my %init_args :InitArgs = (
'INFO' => {
'Type' => \&_check_foo,
'Field' => \@info,
},
);
1;
$ cat test_export.pl
#!/usr/bin/perl -w
use strict;
use warnings;
use Top::Middle;
my $obj = Top::Middle->new(
'info' => 'some_data_or_whatever'
);
exit 0;
|