X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication%2FUser.pm;h=9fb90eba213d7bf8cff9d88f0120a4f64b88364d;hb=236564816ea52eb35739705f88f058b332090fae;hp=7c33c98b5564b22fcd2e62c1f2fc03f5cb31d163;hpb=07e49bc7794302bf7fde3697327184cc4c918cf4;p=catagits%2FCatalyst-Plugin-Authentication.git diff --git a/lib/Catalyst/Plugin/Authentication/User.pm b/lib/Catalyst/Plugin/Authentication/User.pm index 7c33c98..9fb90eb 100644 --- a/lib/Catalyst/Plugin/Authentication/User.pm +++ b/lib/Catalyst/Plugin/Authentication/User.pm @@ -9,7 +9,21 @@ sub id { die "virtual" } sub store { die "virtual" } -sub supports { die "virtual" } +sub supports { + my ( $self, @spec ) = @_; + + my $cursor = $self->supported_features; + + # traverse the feature list, + for (@spec) { + #die "bad feature spec: @spec" if ref($cursor) ne "HASH"; + return if ref($cursor) ne "HASH"; + + $cursor = $cursor->{$_}; + } + + return $cursor; +} __PACKAGE__;