Thread

Posted on Thu Nov 30 20:47:13 2006 by jdhedden
Object::InsideOut v2.25
Object::InsideOut v2.25 adds a user requested feature to be able to specify classes to be exempt from :Restricted and :Private method access permissions. See Restricted and Private Methods in the POD for more details.

I also added a section to the POD called ARGUMENT VALIDATION that documents the usage of Params::Validate and Attribute::Params::Validate with OIO. For this, a small changes was made to OIO code to properly handle Perl's :method attribute.
Direct Responses: 3669 | Write a response
Posted on Fri Dec 1 10:53:03 2006 by gaetan in response to 3668
Re: Object::InsideOut v2.25
Hello Jerry I read your POD doc with this new feature ;-) Is the restriction with the Cumulative attribute an implementation restriction or a conceptual restriction ? I don't understand this restriction from a conceptual point of view Thanks Gaetan
Direct Responses: 3676 | Write a response
Posted on Fri Dec 1 16:07:41 2006 by jdhedden in response to 3669
Re: Object::InsideOut v2.25
Implementation. I'll work on fixing that up.
Direct Responses: 3695 | Write a response
Posted on Mon Dec 4 11:00:57 2006 by gaetan in response to 3676
Re: Object::InsideOut v2.25
Hello Jerry

I tried to use the Attribute::Params::Validate in my program with your example

package Foo; { use Object::InsideOut; use Attribute::Params::Validate; sub foo :method :Validate(bar => 1) { my $self = shift; my %args = @_; my $bar = $args{bar}; } } Foo::foo(bar => "toto"); 1;
As a result I obtain the following error message:
bash> perl ~/tmp/toto.txt Use of inherited AUTOLOAD for non-method Attribute::Handlers::UNIVERSAL::MODIFY_CODE_ATTRIBUTES() i +s deprecated at /usr/lib/perl/site/lib/site_perl/Object/InsideOut.pm line 505. Can't locate class method 'Attribute::Handlers::UNIVERSAL::MODIFY_CODE_ATTRIBUTES' via package 'Att +ribute::Handlers::UNIVERSAL' at /usr/lib/perl/site/lib/site_perl/Object/InsideOut.pm line 502 BEGIN failed--compilation aborted at /users/myself/tmp/toto.txt line 10. bash>
What is wrong ????? I have the last OIO, Attribute::Params::Validate and Attribute::Handlers package version

The code fails when calling the Attribute::Handlers::UNIVERSAL::MODIFY_CODE_ATTRIBUTES function in the InsideOut::MODIFY_CODE_ATTRIBUTES function

Is something wrong in my Perl environment ? Thanks Gaetan
Direct Responses: 3697 | Write a response
Posted on Mon Dec 4 15:50:45 2006 by jdhedden in response to 3695
Re: Object::InsideOut v2.25
If you declare a subroutine as a :method, then you must call it as a method:
Foo->foo(bar => "toto"); # Not Foo::foo()
Direct Responses: 3698 | Write a response
Posted on Mon Dec 4 16:26:40 2006 by gaetan in response to 3697
Re: Object::InsideOut v2.25
(Next time I will reread my mail before sending it) In fact, I tried the 2 calls
Foo->foo(bar => "toto")
and
Foo::foo(bar => "toto")
and I obtained the same error as described previously!!! due to call to Attribute::Handlers::UNIVERSAL::MODIFY_CODE_ATTRIBUTES in InsideOut.pm line 502 Gaetan
Direct Responses: 3699 | Write a response
Posted on Mon Dec 4 16:50:53 2006 by jdhedden in response to 3698
Re: Object::InsideOut v2.25
I get no errors at all with the following code:
package Foo; { use Object::InsideOut; use Attribute::Params::Validate; sub foo :method :Validate(bar => 1) { my $self = shift; my %args = @_; my $bar = $args{bar}; } } Foo::foo(bar => 'toto'); 1;
I cannot explain the error you're receiving. I suggest upgrading your Perl if you are not at 5.8.8, and running:
cpan -i Bundle::Object::InsideOut
to get the latest versions of all modules used by Object::InsideOut.
Direct Responses: 3705 | Write a response
Posted on Tue Dec 5 09:50:03 2006 by gaetan in response to 3699
Re: Object::InsideOut v2.25
I tested the non working code on a Perl version 5.8.0

I have upgraded my Perl to version 5.8.5 and the code is correctly running !!! (this means that extra attributes not managed by OIO do not run with Perl version 5.8.0 (up to version ???). You should maybe indicate it in the pod restriction section)

Thanks

Gaetan
Write a response