package gs; my $pkg = 'gs'; # Export everything! @EXPORT = grep defined(&{$main::{$pkg.'::'}{$_}}), keys %{$main::{$pkg.'::'}};