in reply to defaults via Module from outside

First, for your command line switches, take a look at Getopt::Long. You can call the GetOptions function in a BEGIN{} block before loading modules with use. That will allow you to influence module loading with the command-line switches. G::L is shipped with perl, so there should be no hassle using it.

Why do I mention modules?

Your desire for overriding subroutines can easily be handled in OO Perl. You can make the ordinary case a base class, and subclass that to override. Having your data handling tucked away in modules which define the methods which apply to particular types of data allows you the flewxibility of reuse.

You could just write your subroutines to look at some state set by switches, but that strategy is brittle and doesn't scale well.

The if.pm module is very helpful for conditional module loading.

After Compline,
Zaxo