All pastes #373275 Raw Edit

Mine

public text v1 · immutable
#373275 ·published 2007-02-26 18:08 UTC
rendered paste body
package RSCard;

our $dbhSC;

sub new {
	my $class = shift;
	my $self = {};

	return( bless($self, $class) );
}

sub _init {
	return ($dbhSC);
}

1;



package RSCard::Creates;
use base 'RSCard';

sub new {
	my $self = bless{};
	my $dbhSC = $self->_init();
	$self->{dbhSC} = $dbhSC;
	return($self);
}

sub something {
	my $self = shift;
	warn $self->{dbhSC} . "<<<<\n";
}

1;





use lib '.';

use RSCard;
use RSCard::Creates;

$RSCard::dbhSC = 'test';
my $Creates = new RSCard::Creates;
$Creates->something;