in reply to Re: My globals are visable; but undef'ed
in thread My globals are visable; but undef'ed

Just one correction: don't bless without $class :-)
sub new { my ($self, $email) = @_; my $class = ref($self) || $self; bless { email => $email }, $class }
[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^3: My globals are visable; but undef'ed
by chromatic (Archbishop) on Aug 01, 2008 at 05:38 UTC
    my $class = ref($self) || $self;

    You could throw in another case, just to prevent someone from accidentally calling this method with a $self that happens to evaluate to false:

    my $class = ref($self) || $self || __PACKAGE__;