in reply to Re^4: OO, Library Configuration and Class Variables
in thread OO, Library Configuration and Class Variables

You can make your application reads the configuration and store it in some place your User class knows.

I wrote an application that has a %config all my modules can access (using Config::IniFile). I created sections for all modules and grab configuration from there.

Config example:

[User] lookup_uri = something
Then your code could be like this:
package App; our %config = (); &init; sub init { # loads your configuration file/parameters here and # assigns to %App::config } package User; sub new { my $self = {}; bless $self; $self->{lookup_uri} = $App::config{lookup_uri}; }
You can also specify which class you want to use for Lookup in config file, and instantiate in User::new.

Still hope it helps :)