Help for this page

Select Code to Download


  1. or download this
    my $symbol_table = *{"main::Example::Package::"}{HASH};
    
  2. or download this
    my $symbol_table = \%Example::Package::;
    
  3. or download this
    my $symbol_table = \%{__PACKAGE__ . '::'};
    
  4. or download this
    print "", Dumper($symbol_table), "\n";
    
  5. or download this
    my %subs = %{__PACKAGE__ . '::'};
    *{$_}{CODE} or delete $subs{$_} for keys %subs;
    
  6. or download this
    my %subs = map { $_ => *{$_}{CODE} } grep *{$_}{CODE},
      keys %{__PACKAGE__ . '::'};
    
  7. or download this
    my %subs;
    while ( my ($k,$v)=each %{__PACKAGE__ . '::'} ) {
        $subs{$k}=$v if *{$v}{CODE};
    }
    
  8. or download this
    my @subs = grep *{$_}{CODE}, keys %{__PACKAGE__ . '::'};
    
  9. or download this
    package Example::Package;
    
    ...
    print Dumper [added_subs];
    
    __END__