This puts the configuration data in the subclasses, not the superclass. But re-reading your node, perhaps this is exactly what you want to avoid...?use My::Subclass qw( connection args ); ### package My::Subclass; use base 'SuperClass'; sub import { my $class = shift; SuperClass->db_connect(@_); } ### package SuperClass; sub db_connect { my $class = shift; # use @_ to make the DB connection }
In reply to Re: dependencies and loose coupling
by japhy
in thread dependencies and loose coupling
by perrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |