http://qs321.pair.com?node_id=274487

princepawn has asked for the wisdom of the Perl Monks concerning the following question:

I managed to use a variable to specify which of two modules with the same API I wanted to use (one uses XS, the other does not). But I am not sure my solution is cleanest. Does anyone have a suggestion for a cleaner way to do this?
BEGIN { + $main::MODULE = 'Text::CSV'; # $main::MODULE = 'Text::CSV_XS'; my $string = "use $main::MODULE;"; eval $string; } my $csv = $main::MODULE->new;

Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality