# test.pl use strict; package Foo; sub new{ return bless {}, shift; } sub foo{ my $self = shift; print "Foo called\n"; } package main; # print the full symbol table, notice the Foo:: entry print "$_ => $::{$_}\n" foreach keys %::; print "\n\n"; delete $::{'Foo::'}; # shouldn't this delete the symbol table for Foo? # print again the full symbol table, notice Foo:: is gone. print "$_ => $::{$_}\n" foreach keys %::; print "\n\n"; # seems still there. print "$_ => $Foo::{$_}\n" foreach keys %Foo::; print "\n\n"; # but can't call the following, as expected my $f = new Foo(); $f->foo(); #### " => *main::" CORE:: => *main::CORE:: strict:: => *main::strict:: $ => *main::$ Foo:: => *main::Foo:: main:: => *main::main:: => *main:: @ => *main::@ :: => *main:::: " => *main::" CORE:: => *main::CORE:: strict:: => *main::strict:: $ => *main::$ main:: => *main::main:: => *main:: @ => *main::@ :: => *main:::: foo => *Foo::foo new => *Foo::new Can't locate object method "new" via package "Foo" (perhaps you forgot to load " Foo"?) at test.pl line 30.