package Scraper; sub new { my( $pkg, $strategy_class ) = @_; bless { strategy_class => $strategy_class, }, $pkg } sub scrape { my $self = shift; my $config_data = $self->{'strategy_class'}->config_data(); # ... proceed to scrape using this config data } package Scraper::Yahoo; # as a strategy of Scraper, this class only needs to implement those methods # a Scraper will call. sub config_data { return( starting_page => 'www.yahoo.com/foo/', some_regex => qr/foo(.*?)bar/, html_tree_spec => [ '_tag', 'div', 'id', 'headlines' ], ); } . . . package main; # pass the strategy class name to the constructor: my $yahoo_scraper = new Scraper 'Scraper::Yahoo';