summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-11-12 04:09:54 -0600
committerJesse Luehrs <doy@tozt.net>2010-11-12 04:09:54 -0600
commit9b608466b5fdd9e91e34e050eb9ca861e36aa71d (patch)
tree19ab0857a9373bfab7131a2de1fb5fc0b08b15f4 /lib
parenta382a84ba7f959ceab7ecbf75e7c937153ebb603 (diff)
downloadpackage-stash-xs-9b608466b5fdd9e91e34e050eb9ca861e36aa71d.tar.gz
package-stash-xs-9b608466b5fdd9e91e34e050eb9ca861e36aa71d.zip
implement list_all_package_symbols
Diffstat (limited to 'lib')
-rw-r--r--lib/Package/Stash.pm33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/Package/Stash.pm b/lib/Package/Stash.pm
index 59b2c29..a984a96 100644
--- a/lib/Package/Stash.pm
+++ b/lib/Package/Stash.pm
@@ -359,39 +359,6 @@ etc). Note that if the package contained any C<BEGIN> blocks, perl will leave
an empty typeglob in the C<BEGIN> slot, so this will show up if no filter is
used (and similarly for C<INIT>, C<END>, etc).
-=cut
-
-sub list_all_package_symbols {
- my ($self, $type_filter) = @_;
-
- my $namespace = $self->namespace;
- return keys %{$namespace} unless defined $type_filter;
-
- # NOTE:
- # or we can filter based on
- # type (SCALAR|ARRAY|HASH|CODE)
- if ($type_filter eq 'CODE') {
- return grep {
- # any non-typeglob in the symbol table is a constant or stub
- ref(\$namespace->{$_}) ne 'GLOB'
- # regular subs are stored in the CODE slot of the typeglob
- || defined(*{$namespace->{$_}}{CODE})
- } keys %{$namespace};
- }
- elsif ($type_filter eq 'SCALAR') {
- return grep {
- ref(\$namespace->{$_}) eq 'GLOB'
- && defined(${*{$namespace->{$_}}{'SCALAR'}})
- } keys %{$namespace};
- }
- else {
- return grep {
- ref(\$namespace->{$_}) eq 'GLOB'
- && defined(*{$namespace->{$_}}{$type_filter})
- } keys %{$namespace};
- }
-}
-
=head1 BUGS
No known bugs.