diff --git a/lib/IdPAccountManager/AuthenticationToken.pm b/lib/IdPAccountManager/AuthenticationToken.pm index 2262d7d55c489a50258c61848814df2143bbab3f..992cbda6581164baeae02456d4c3ceaf53787e6e 100644 --- a/lib/IdPAccountManager/AuthenticationToken.pm +++ b/lib/IdPAccountManager/AuthenticationToken.pm @@ -7,8 +7,8 @@ package IdPAccountManager::AuthenticationToken; use strict; use warnings; -use IdPAccountManager::Data::Authenticationtoken; -use IdPAccountManager::Data::Authenticationtoken::Manager; +use IdPAccountManager::Data::AuthenticationToken; +use IdPAccountManager::Data::AuthenticationToken::Manager; use Conf; @@ -19,7 +19,7 @@ use Carp; INIT { ## Set error mode to non fatal - IdPAccountManager::Data::Authenticationtoken::Manager->error_mode('return'); + IdPAccountManager::Data::AuthenticationToken::Manager->error_mode('return'); } sub new { @@ -30,13 +30,13 @@ sub new { bless $self, $pkg; - ## Object may be created either with a hashref as argument or an IdPAccountManager::Data::Authenticationtoken object - ## Second case is usefull when fetching a set of IdPAccountManager::Data::Authenticationtoken via IdPAccountManager::Data::Authenticationtoken::Manager - if (ref($_[0]) eq 'IdPAccountManager::Data::Authenticationtoken') { + ## Object may be created either with a hashref as argument or an IdPAccountManager::Data::AuthenticationToken object + ## Second case is usefull when fetching a set of IdPAccountManager::Data::AuthenticationToken via IdPAccountManager::Data::AuthenticationToken::Manager + if (ref($_[0]) eq 'IdPAccountManager::Data::AuthenticationToken') { $self->{'persistent'} = $_[0]; } else { $self->{'persistent'} = - IdPAccountManager::Data::Authenticationtoken->new(%args); + IdPAccountManager::Data::AuthenticationToken->new(%args); } return $self; @@ -114,7 +114,7 @@ sub list_authentication_tokens { my %args = @_; my $persistent_tokens = - IdPAccountManager::Data::Authenticationtoken::Manager + IdPAccountManager::Data::AuthenticationToken::Manager ->get_authenticationtokens(%args); my $authentication_tokens; foreach my $persistent_token (@{$persistent_tokens}) { diff --git a/lib/IdPAccountManager/Data/Authenticationtoken.pm b/lib/IdPAccountManager/Data/AuthenticationToken.pm similarity index 92% rename from lib/IdPAccountManager/Data/Authenticationtoken.pm rename to lib/IdPAccountManager/Data/AuthenticationToken.pm index 0efcac0ac96e3cc50c70bcb41e603e5941007b34..8c5c1920b8b0f527ab8502b3cf6c8ce2d581937d 100644 --- a/lib/IdPAccountManager/Data/Authenticationtoken.pm +++ b/lib/IdPAccountManager/Data/AuthenticationToken.pm @@ -1,4 +1,4 @@ -package IdPAccountManager::Data::Authenticationtoken; +package IdPAccountManager::Data::AuthenticationToken; use strict; use warnings; diff --git a/lib/IdPAccountManager/Data/Authenticationtoken/Manager.pm b/lib/IdPAccountManager/Data/Authenticationtoken/Manager.pm deleted file mode 100644 index 5b7563eea8ed613a182307b3fdb0f44c4d256dc6..0000000000000000000000000000000000000000 --- a/lib/IdPAccountManager/Data/Authenticationtoken/Manager.pm +++ /dev/null @@ -1,15 +0,0 @@ -package IdPAccountManager::Data::Authenticationtoken::Manager; - -use strict; -use warnings; - -use base qw(Rose::DB::Object::Manager); - -use IdPAccountManager::Data::Authenticationtoken; - -sub object_class { 'IdPAccountManager::Data::Authenticationtoken' } - -__PACKAGE__->make_manager_methods('authenticationtokens'); - -1; - diff --git a/lib/IdPAccountManager/Data/Serviceprovider.pm b/lib/IdPAccountManager/Data/ServiceProvider.pm similarity index 90% rename from lib/IdPAccountManager/Data/Serviceprovider.pm rename to lib/IdPAccountManager/Data/ServiceProvider.pm index 5a1304be31d453bc38b8dadc58d4105c63444fd7..209ac30cc3304cda1a008b422f5c69cb0732cd1a 100644 --- a/lib/IdPAccountManager/Data/Serviceprovider.pm +++ b/lib/IdPAccountManager/Data/ServiceProvider.pm @@ -1,4 +1,4 @@ -package IdPAccountManager::Data::Serviceprovider; +package IdPAccountManager::Data::ServiceProvider; use strict; use warnings; diff --git a/lib/IdPAccountManager/Data/Serviceprovider/Manager.pm b/lib/IdPAccountManager/Data/Serviceprovider/Manager.pm deleted file mode 100644 index 63f4734a117749f0cd77411ee27f4dc10222ffdf..0000000000000000000000000000000000000000 --- a/lib/IdPAccountManager/Data/Serviceprovider/Manager.pm +++ /dev/null @@ -1,15 +0,0 @@ -package IdPAccountManager::Data::Serviceprovider::Manager; - -use strict; -use warnings; - -use base qw(Rose::DB::Object::Manager); - -use IdPAccountManager::Data::Serviceprovider; - -sub object_class { 'IdPAccountManager::Data::Serviceprovider' } - -__PACKAGE__->make_manager_methods('serviceproviders'); - -1; - diff --git a/lib/IdPAccountManager/Data/Testaccount.pm b/lib/IdPAccountManager/Data/TestAccount.pm similarity index 93% rename from lib/IdPAccountManager/Data/Testaccount.pm rename to lib/IdPAccountManager/Data/TestAccount.pm index 9c8fe2e16aa53fc52c6140ef9da22ad0cc16ca79..222552308c9988d1f1d92b120634d9f38d175037 100644 --- a/lib/IdPAccountManager/Data/Testaccount.pm +++ b/lib/IdPAccountManager/Data/TestAccount.pm @@ -1,4 +1,4 @@ -package IdPAccountManager::Data::Testaccount; +package IdPAccountManager::Data::TestAccount; use strict; use warnings; diff --git a/lib/IdPAccountManager/Data/TestAccount/Manager.pm b/lib/IdPAccountManager/Data/TestAccount/Manager.pm new file mode 100644 index 0000000000000000000000000000000000000000..4d967885de7b4f6c96c83e42ccc6466ce6013df0 --- /dev/null +++ b/lib/IdPAccountManager/Data/TestAccount/Manager.pm @@ -0,0 +1,15 @@ +package IdPAccountManager::Data::TestAccount::Manager; + +use strict; +use warnings; + +use base qw(Rose::DB::Object::Manager); + +use IdPAccountManager::Data::TestAccount; + +sub object_class { 'IdPAccountManager::Data::TestAccount' } + +__PACKAGE__->make_manager_methods('testaccounts'); + +1; + diff --git a/lib/IdPAccountManager/Data/Testaccount/Manager.pm b/lib/IdPAccountManager/Data/Testaccount/Manager.pm deleted file mode 100644 index fb4edcc1a5fb3b1112a5ecdd4611117a82d75f29..0000000000000000000000000000000000000000 --- a/lib/IdPAccountManager/Data/Testaccount/Manager.pm +++ /dev/null @@ -1,15 +0,0 @@ -package IdPAccountManager::Data::Testaccount::Manager; - -use strict; -use warnings; - -use base qw(Rose::DB::Object::Manager); - -use IdPAccountManager::Data::Testaccount; - -sub object_class { 'IdPAccountManager::Data::Testaccount' } - -__PACKAGE__->make_manager_methods('testaccounts'); - -1; - diff --git a/lib/IdPAccountManager/ServiceProvider.pm b/lib/IdPAccountManager/ServiceProvider.pm index 37cf7673d34aefd2c0cc229ee2933ed28ac9641d..aafc696265ea90014a095f291545679ca0ff4663 100644 --- a/lib/IdPAccountManager/ServiceProvider.pm +++ b/lib/IdPAccountManager/ServiceProvider.pm @@ -7,10 +7,10 @@ package IdPAccountManager::ServiceProvider; use strict; use warnings; -use base 'IdPAccountManager::Data::Serviceprovider'; +use base 'IdPAccountManager::Data::ServiceProvider'; -use IdPAccountManager::Data::Serviceprovider; -use IdPAccountManager::Data::Serviceprovider::Manager; +use IdPAccountManager::Data::ServiceProvider; +use IdPAccountManager::Data::ServiceProvider::Manager; use IdPAccountManager::Tools; use Conf; @@ -19,7 +19,7 @@ use Carp; INIT { ## Set error mode to non fatal - IdPAccountManager::Data::Serviceprovider::Manager->error_mode('return'); + IdPAccountManager::Data::ServiceProvider::Manager->error_mode('return'); } ## Print the content of a test account @@ -69,7 +69,7 @@ sub list_service_providers { my %args = @_; my $persistent_accounts = - IdPAccountManager::Data::Serviceprovider::Manager->get_serviceproviders( + IdPAccountManager::Data::ServiceProvider::Manager->get_serviceproviders( %args); my $service_providers; foreach my $persistent_sp (@{$persistent_accounts}) { diff --git a/lib/IdPAccountManager/TestAccount.pm b/lib/IdPAccountManager/TestAccount.pm index 60f685038bd4d7ca776b1df287fee354237d99c1..a586a98c66937e4552e3e778d0dcfb550be0ce27 100644 --- a/lib/IdPAccountManager/TestAccount.pm +++ b/lib/IdPAccountManager/TestAccount.pm @@ -7,8 +7,8 @@ package IdPAccountManager::TestAccount; use strict; use warnings; -use IdPAccountManager::Data::Testaccount; -use IdPAccountManager::Data::Testaccount::Manager; +use IdPAccountManager::Data::TestAccount; +use IdPAccountManager::Data::TestAccount::Manager; use IdPAccountManager::Tools; use Conf; @@ -18,7 +18,7 @@ use Carp; INIT { ## Set error mode to non fatal - IdPAccountManager::Data::Testaccount::Manager->error_mode('return'); + IdPAccountManager::Data::TestAccount::Manager->error_mode('return'); } sub new { @@ -29,13 +29,13 @@ sub new { bless $self, $pkg; - ## Object may be created either with a hashref as argument or an IdPAccountManager::Data::Testaccount object - ## Second case is usefull when fetching a set of IdPAccountManager::Data::Testaccount via IdPAccountManager::Data::Testaccount::Manager - if (ref($_[0]) eq 'IdPAccountManager::Data::Testaccount') { + ## Object may be created either with a hashref as argument or an IdPAccountManager::Data::TestAccount object + ## Second case is usefull when fetching a set of IdPAccountManager::Data::TestAccount via IdPAccountManager::Data::TestAccount::Manager + if (ref($_[0]) eq 'IdPAccountManager::Data::TestAccount') { $self->{'persistent'} = $_[0]; } else { $self->{'persistent'} = - IdPAccountManager::Data::Testaccount->new(%args); + IdPAccountManager::Data::TestAccount->new(%args); } return $self; @@ -103,7 +103,7 @@ sub list_test_accounts { my %args = @_; my $persistent_accounts = - IdPAccountManager::Data::Testaccount::Manager->get_testaccounts(%args); + IdPAccountManager::Data::TestAccount::Manager->get_testaccounts(%args); my $accounts; foreach my $persistent_account (@{$persistent_accounts}) { my $account = IdPAccountManager::TestAccount->new($persistent_account);