I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-01-24 21:29:27-08 by je44ery in response to 1652
Re: :Restricted methods imported into child classes?
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;
Direct Responses: Write a response