projects
/
gitmo/Class-MOP.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
988fb42
)
Explicitly die if get_all_package_symbols is called as a class method
Dave Rolsky [Mon, 1 Sep 2008 15:05:01 +0000 (15:05 +0000)]
lib/Class/MOP/Package.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Class/MOP/Package.pm
b/lib/Class/MOP/Package.pm
index
63299f8
..
a7ba14a
100644
(file)
--- a/
lib/Class/MOP/Package.pm
+++ b/
lib/Class/MOP/Package.pm
@@
-276,6
+276,10
@@
sub list_all_package_symbols {
sub get_all_package_symbols {
my ($self, $type_filter) = @_;
+
+ die "Cannot call get_all_package_symbols as a class method"
+ unless ref $self;
+
my $namespace = $self->namespace;
return %$namespace unless defined $type_filter;