Re: 2 questions: Implementations and Roles

2009-02-06 Thread Jon Lang
Timothy S. Nelson wrote: >Also, is there a simple way to know when I should be using a class > vs. a role? If you plan on creating objects with it, use a class. If you plan on creating classes with it, use a role. -- Jonathan "Dataweaver" Lang

2 questions: Implementations and Roles

2009-02-06 Thread Timothy S. Nelson
Quick question about implementing things like the DBI/DBD split in Perl6. In Perl5, you have code in DBI that essentially says: - $driverpackage = "DBD::$driver"; eval "use $driverpackage; \$obj = $driverpackage->new(\%params);"; - This has always seemed ugly to me. Is there