RE: Perl Class simple problem: What is "die" being used for?

2004-05-29 Thread Charles K. Clarkson
Rob Richardson wrote: : Greetings! : : I'm curious about the Graeme's _init() method, reproducted below: : : sub _init { : my $self = shift; : die $self->site(); : } : : What is "die" used for? I thought that the effect of "die" : was to end the process. Tha

Re: Perl Class simple problem

2004-05-29 Thread drieux
On May 29, 2004, at 5:10 AM, Graeme McLaren wrote: [..] I create an object and pass a value to my constructor like this: Conf->new(site=>'x'), this tells the constructor which site I want the config for, then at the end of the constructor I call $self->_init(); This passes a reference to $self (

RE: Perl Class simple problem

2004-05-29 Thread Charles K. Clarkson
Graeme McLaren wrote: [snip useful code] : $self->_init(); Pass the site to _init(): $self->_init( $arg{site} ); : } : : sub _init{ : my $self = shift; my $site = shift; die $site; : die %{$self}; : } That was the short answer. The long an