Subject: | A small list of disasters |
Date: | Thu, 16 Feb 2012 17:00:52 +0000 |
To: | bugs-VSO [...] rt.cpan.org |
From: | Matt S Trout <mst [...] shadowcat.co.uk> |
- using yourself as a superclass is stupid. 'use My::VSO::Class;' # BOOM
- defined(@array) is deprecated and doesn't do what you think it does
- your BUILD implementation is incompatible with every other such on CPAN
- jamming validation code into the class is scary
- your method modifier attempt is buggy and slow compared to everybody else's
- $INC{$file} ||= $file; is a lie and will break things
- all exports are now also methods on your classes, which is horrible
- you have no explanation as to what your code provides that Moose/Mouse/Moo/Mo
don't, except for a bunch of miserably wrong design decisions and bugs.
- and in fact, Mo is massively simpler. Moo provides the same feature set and
then some, but actually works. And Moose/Mouse are the real thing.
I'm sure you had a lot of fun writing this, but if you're going to leave it
on CPAN without a complete rewrite then it needs a big "warning warning don't
try and use this for real code" sticker putting on it, and if you're going to
do a complete rewrite then the end result is basically going to be Moo/Mo, so
I'm not really sure I see the point.
I'd encourage you to instead consider factoring out your VSO::Subtype code
into something that can be used in Moo classes, and switching to that - if
you wanted to have a go at that I'd be more than happy to help.
--
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue
http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/
Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
commercial support, training and consultancy packages could help your team.