use strict; use warnings; my $t = new STRTicket(33); # Gave it a ticket ID of 33, to avoid DIE error msg. {package Ticket; sub new { my $class = shift; my $ticketid = shift; my $self= { 'TICKETID' => undef, 'SOURCE' => undef, 'CREATEDBY' => undef, 'OWNER' => undef, 'MODIFIEDBY'=> undef, 'CREATEDON' => undef, 'MODIFIEDON'=> undef, 'COMPANYNAME'=> undef, 'STATE' => undef, 'STATUS' => undef, 'BZTICKETS' => [], # NEEDS to be a SCALAR (Arrayref) NOT a list. 'AGE' => undef, 'TITLE' => undef, }; bless $self, $class; if ( defined $ticketid) { #--- You had $Ticket here - UNDEFINED..... $self->{'TICKETID'} = $ticketid; # and here ...... } else { die "Ticket object instantiated without a ticket id! This should never happen +.\n"; } return $self; } sub load_bztickets($){ my $self= shift; my $dbh = shift; # pass in the database reference for Bugzilla } 1; } #--- I added Braces to isolate modules #--- deleted unused packages.... { package STRTicket; use base qw[Ticket]; 1; }