[Catalyst-commits] r10955 -
Catalyst-Authentication-Credential-FBConnect/trunk/lib/Catalyst/Authentication/Credential
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu Jul 23 00:02:46 GMT 2009
Author: t0m
Date: 2009-07-23 00:02:46 +0000 (Thu, 23 Jul 2009)
New Revision: 10955
Modified:
Catalyst-Authentication-Credential-FBConnect/trunk/lib/Catalyst/Authentication/Credential/FBConnect.pm
Log:
Comments
Modified: Catalyst-Authentication-Credential-FBConnect/trunk/lib/Catalyst/Authentication/Credential/FBConnect.pm
===================================================================
--- Catalyst-Authentication-Credential-FBConnect/trunk/lib/Catalyst/Authentication/Credential/FBConnect.pm 2009-07-23 00:00:22 UTC (rev 10954)
+++ Catalyst-Authentication-Credential-FBConnect/trunk/lib/Catalyst/Authentication/Credential/FBConnect.pm 2009-07-23 00:02:46 UTC (rev 10955)
@@ -2,9 +2,12 @@
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 @@
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;
More information about the Catalyst-commits
mailing list