plainblack.com
Username Password
search
Bookmark and Share

    

Class::InsideOut is dead

User JT
Date 9/24/2009 1:16 pm
Views 848
Rating -1    Rate [
|
]
Previous · Next
User Message
JT
Effective immediately I'm revoking the use of inside out objects in  
WebGUI. Therefore you no longer need to use Class::InsideOut in your  
objects, nor do you need to follow that particular Perl Best Practice.

They never really accomplished the goal I had intended, and we didn't  
move to them everywhere, so now the plan is to remove them entirely  
from the system. When we switch to Perl 6 in a far future release then  
we'll convert to using that best practice everywhere because it will  
be automatic.

JT Smith
ph: 703-286-2525 x810

Create like a god, command like a king, work like a slave.



Back to Top
Rate [
|
]
 
 
perlDreamer

Two questions for you:


1) Why do we hate Class::InsideOut? (just so we don't go down similar paths in the future)

2) What should we use instead? (Object::Tiny, Moose :), good ol' fashioned perl code)



Back to Top
Rate [
|
]
 
 
patspam
Or Class::XSAccessor? "The XS accessor methods were between 1.6 and 2.5 times faster than typical pure-perl accessors in some simple benchmarking"

Or Object::Tiny::XS which is Object::Tiny + Class::XSAccessor?

On Fri, Sep 25, 2009 at 7:31 AM, <colink@perldreamer.com> wrote:
perlDreamer wrote:

Two questions for you:


1) Why do we hate Class::InsideOut? (just so we don't go down similar paths in the future)

2) What should we use instead? (Object::Tiny, Moose :), good ol' fashioned perl code)



http://www.webgui.org/develop/forum/classinsideout-is-dead/1


--

WebGUI
http://www.webgui.org




Back to Top
Rate [
|
]
 
 
JT
Or Class::XSAccessor? "The XS accessor methods were between 1.6 and 2.5 times faster than typical pure-perl accessors in some simple benchmarking"

Or Object::Tiny::XS which is Object::Tiny + Class::XSAccessor?


None of the above. See the reply to perlDreamer. Let's just keep it simple.

Back to Top
Rate [
|
]
 
 
JT

1) Why do we hate Class::InsideOut? (just so we don't go down similar paths in the future)

We don't hate it. It just doesn't get us anything. After reading PBP I started searching for a better object system. Graham suggested this one as being small and unobtrusive. I tried it out, and it was relatively easy to use. So we adopted it. However, I didn't really think about "what does this get us?". I just followed PBP blindly. 
Class::InsideOut gets us truly private methods (and object data) and some simple generated accessors. However, neither is terribly important the way we build classes. The classes become slightly heavier, and slightly harder to develop. Basically, we get nothing for doing it.
If we were going to do something, we should do Moose. However, we're also not going to do that because it would require a complete rewrite of WebGUI to support that. And when it comes time to rewrite WebGUI, we'll be doing it in Perl 6 (or perhaps, but not likely some other language), and then Moose becomes irrelevant. 

2) What should we use instead? (Object::Tiny, Moose :), good ol' fashioned perl code)

I already answered this question in my original post. NOTHING, but good ol' fashioned perl code.



Back to Top
Rate [
|
]
 
 
preaction

I'm giving my support to getting rid of C::IO, but I just want to clear up a misconception:

We don't need to rewrite all of WebGUI to be able to use Moose, just as we didn't need to rewrite WebGUI to use C::IO. Moose objects are even hashes underneath, just like regular Perl object (and unlike C::IO objects).

IMO the only thing stopping us from using Moose and DBIC is that it adds 6 meg (on my unscientific test) to our pre-forked mod_perl memory load.

DBIC would require much more work than Moose would.



Back to Top
Rate [
|
]
 
 
JT
You're misunderstanding every conversation we've ever had about Moose  
then. I'm not saying that Moose requires us to rewrite WebGUI if we  
adopt it. I'm saying *I* am going to require a rewrite of WebGUI to  
adopt Moose, because I don't want 1 class to be using Moose and  
another to be using Class::InsideOut, and another to be using good ol'  
Perl.



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved