#!/usr/bin/perl -w use strict; use Module::Main; my $REQ = new Module::Main; $REQ->init(); $REQ->start_it(); #### package Module::Main; sub new { my $class = shift; my $self = {}; bless ($self, $class); return $self; } sub init { my $self = shift; $self->{SEC1} = new Module::Section1; $self->{SEC2} = new Module::Section2; return 1; } sub start_it { my $self = shift; $self->{SEC1}->do_something(); return 1; } #### package Module::Section1; sub new { my $class = shift; my $self = {}; bless ($self, $class); return $self; } sub do_something { my $self = shift; =cut HERE! Now I need to access $REQ->{SEC2}->method(); The problem? $self now contains the object specific to Module::Section1 (ie: $REQ->{SEC1}, not to $REQ. So I can't do $self->{SEC2}->method(). I could always change the my() declaration in index.pl to an our() and then use $::REQ->{SEC2}->method(), but this just defeats the purpose of using OO programming! Besides, this would require that the variable be named $REQ and not anything else. I could always pass a reference to $REQ to everything subroutine/method, but that just seems extremely messy and bad programming style. So how can I accomplish this? =cut }