X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FCredential%2FFBConnect.pm;fp=lib%2FCatalyst%2FAuthentication%2FCredential%2FFBConnect.pm;h=869d4669deef3d3f69f45c0a3bf35e44d29e040a;hb=5c5e442dd6a40b98b0462df2c71eba85c61c3f9c;hp=33b0c078c78f4107791349dc283e49d75ba10d00;hpb=c9db14509611420472a92d1278d06ebd5fa85543;p=catagits%2FCatalyst-Authentication-Credential-FBConnect.git diff --git a/lib/Catalyst/Authentication/Credential/FBConnect.pm b/lib/Catalyst/Authentication/Credential/FBConnect.pm index 33b0c07..869d466 100644 --- a/lib/Catalyst/Authentication/Credential/FBConnect.pm +++ b/lib/Catalyst/Authentication/Credential/FBConnect.pm @@ -2,9 +2,12 @@ package Catalyst::Authentication::Credential::FBConnect; use strict; use warnings; -use Moose; +use Moose; # Moose gave you strict and warnings already -has _config => ( is => 'rw' ); +# This _config thing just isn't needed.. It's a throwback in the code you've +# cargo culted to the days when the auth credential used to be a plugin +# on the app class :/ +has _config => ( is => 'rw' ); # Do these actually need to be rw?? has debug => ( is => 'rw' ); has key => ( is => 'rw' ); has secret => ( is => 'rw' ); @@ -14,12 +17,13 @@ has fbconnect => ( is => 'rw' ); use WWW::Facebook::API; use Catalyst::Exception (); -sub new { +sub new { # Writing your own ->new method makes Moose sad, implement BUILDARGS + # and BUILD instead my ($class, $config, $c, $realm) = @_; my $self = { _config => { %{ $config }, - %{ $realm->{config} } + %{ $realm->{config} } # Ewww, gross hack to steal the realms config too. } }; bless $self, $class;