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 a better way to do it?

Also, is there a simple way to know when I should be using a class vs. a role?

        Thanks,


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayl...@wayland.id.au    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

Reply via email to