[Dbix-class] RFC: Possibly cleaner output for DBIC::Schema::Loader dumps

Matt S Trout dbix-class at trout.me.uk
Mon Jul 24 17:38:09 CEST 2006


Nilson Santos Figueiredo Junior wrote:
> On 7/21/06, A. Pagaltzis <pagaltzis at gmx.de> wrote:
>> As opposed to the bug reports or puzzled questions when someone
>> says `$foo{ __PACKAGE__ } = $bar` and wonders why it didn't do
>> what they expected.
> 
> I wasn't aware of this one. Nasty.
> 
> This makes me feel I'm really heading towards the right way when I try
> to avoid having explicit __PACKAGE__ lying around my code. Besides
> making the code look better. ;-)
> 
> It's a weird thing no one has came up with a better way to handle this
> __PACKAGE__ thing before. Even a constant named PACKAGE (or CLASS or
> SELF) would probably be better.

http://search.cpan.org/dist/CLASS/lib/CLASS.pm

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list