Permalink
Browse files

fix registration code for compatibility

  • Loading branch information...
1 parent 441974e commit 6a2d7a71f502d1b1c90301b95168b4520afbd778 @lestrrat lestrrat committed Apr 13, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 core/lib/Pixis/Plugin.pm
View
@@ -141,8 +141,11 @@ sub register {
# if ($self->has_navigation) {
# $c->add_navigation($_) for @{$self->navigation};
# }
- $registry->set(api => (split(/::/, blessed($_)))[-1], $_)
- for $self->extra_api;
+ foreach my $api ($self->extra_api) {
+ my $pkg = blessed($api);
+ $pkg =~ s/^Pixis::API:://;
+ $registry->set(api => split(/::/, $pkg), $api);
+ }
}
1;

0 comments on commit 6a2d7a7

Please sign in to comment.