From ac5522802741d3092b371ab6b57199cb8a587bf9 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 30 Dec 2010 16:56:32 +0100 Subject: [PATCH] Verzeichnis SL/DB/Helpers in SL/DB/Helper umbenannt (Konsistenz) --- SL/DB/{Helpers => Helper}/ALL.pm | 8 ++++---- SL/DB/{Helpers => Helper}/Attr.pm | 8 ++++---- SL/DB/{Helpers => Helper}/ConventionManager.pm | 4 ++-- SL/DB/{Helpers => Helper}/Manager.pm | 2 +- SL/DB/{Helpers => Helper}/Mappings.pm | 0 SL/DB/{Helpers => Helper}/Metadata.pm | 8 ++++---- SL/DB/{Helpers => Helper}/Sorted.pm | 6 +++--- SL/DB/Manager/DeliveryOrder.pm | 4 ++-- SL/DB/Manager/Employee.pm | 4 ++-- SL/DB/Manager/Invoice.pm | 2 +- SL/DB/Manager/Order.pm | 4 ++-- SL/DB/Manager/Part.pm | 4 ++-- SL/DB/Manager/PurchaseInvoice.pm | 4 ++-- SL/DB/Manager/TransferType.pm | 2 +- SL/DB/Object.pm | 8 ++++---- bin/mozilla/common.pl | 4 ++-- scripts/rose_auto_create_model.pl | 8 ++++---- t/helper/mapping.t | 4 ++-- 18 files changed, 42 insertions(+), 42 deletions(-) rename SL/DB/{Helpers => Helper}/ALL.pm (91%) rename SL/DB/{Helpers => Helper}/Attr.pm (94%) rename SL/DB/{Helpers => Helper}/ConventionManager.pm (86%) rename SL/DB/{Helpers => Helper}/Manager.pm (92%) rename SL/DB/{Helpers => Helper}/Mappings.pm (100%) rename SL/DB/{Helpers => Helper}/Metadata.pm (76%) rename SL/DB/{Helpers => Helper}/Sorted.pm (98%) diff --git a/SL/DB/Helpers/ALL.pm b/SL/DB/Helper/ALL.pm similarity index 91% rename from SL/DB/Helpers/ALL.pm rename to SL/DB/Helper/ALL.pm index 16184c5a1..50f4b3db7 100644 --- a/SL/DB/Helpers/ALL.pm +++ b/SL/DB/Helper/ALL.pm @@ -1,4 +1,4 @@ -package SL::DB::Helpers::ALL; +package SL::DB::Helper::ALL; use strict; @@ -86,16 +86,16 @@ __END__ =head1 NAME -SL::DB::Helpers::ALL: Dependency-only package for all SL::DB::* modules +SL::DB::Helper::ALL: Dependency-only package for all SL::DB::* modules =head1 SYNOPSIS - use SL::DB::Helpers::ALL; + use SL::DB::Helper::ALL; =head1 DESCRIPTION This module depends on all modules in SL/DB/*.pm for the convenience -of being able to write a simple \C and +of being able to write a simple \C and having everything loaded. This is supposed to be used only in the Lx-Office console. Normal modules should C only the modules they actually need. diff --git a/SL/DB/Helpers/Attr.pm b/SL/DB/Helper/Attr.pm similarity index 94% rename from SL/DB/Helpers/Attr.pm rename to SL/DB/Helper/Attr.pm index 01c97c2de..463bfd654 100644 --- a/SL/DB/Helpers/Attr.pm +++ b/SL/DB/Helper/Attr.pm @@ -113,16 +113,16 @@ __END__ =head1 NAME -SL::DB::Helpers::Attr - attribute helpers +SL::DB::Helper::Attr - attribute helpers =head1 SYNOPSIS - use SL::DB::Helpers::Attr; - SL::DB::Helpers::Attr::make($class, + use SL::DB::Helper::Attr; + SL::DB::Helper::Attr::make($class, method_name => 'numeric(15,5)', datemethod => 'date' ); - SL::DB::Helpers::Attr::auto_make($class); + SL::DB::Helper::Attr::auto_make($class); =head1 DESCRIPTION diff --git a/SL/DB/Helpers/ConventionManager.pm b/SL/DB/Helper/ConventionManager.pm similarity index 86% rename from SL/DB/Helpers/ConventionManager.pm rename to SL/DB/Helper/ConventionManager.pm index 1d9cd8415..35c6b1ef2 100644 --- a/SL/DB/Helpers/ConventionManager.pm +++ b/SL/DB/Helper/ConventionManager.pm @@ -1,4 +1,4 @@ -package SL::DB::Helpers::ConventionManager; +package SL::DB::Helper::ConventionManager; use strict; @@ -23,7 +23,7 @@ sub auto_manager_base_name { } sub auto_manager_base_class { - return 'SL::DB::Helpers::Manager'; + return 'SL::DB::Helper::Manager'; } 1; diff --git a/SL/DB/Helpers/Manager.pm b/SL/DB/Helper/Manager.pm similarity index 92% rename from SL/DB/Helpers/Manager.pm rename to SL/DB/Helper/Manager.pm index 4399f5db0..529053338 100644 --- a/SL/DB/Helpers/Manager.pm +++ b/SL/DB/Helper/Manager.pm @@ -1,4 +1,4 @@ -package SL::DB::Helpers::Manager; +package SL::DB::Helper::Manager; use strict; diff --git a/SL/DB/Helpers/Mappings.pm b/SL/DB/Helper/Mappings.pm similarity index 100% rename from SL/DB/Helpers/Mappings.pm rename to SL/DB/Helper/Mappings.pm diff --git a/SL/DB/Helpers/Metadata.pm b/SL/DB/Helper/Metadata.pm similarity index 76% rename from SL/DB/Helpers/Metadata.pm rename to SL/DB/Helper/Metadata.pm index e6020a287..9ce1f1192 100644 --- a/SL/DB/Helpers/Metadata.pm +++ b/SL/DB/Helper/Metadata.pm @@ -1,18 +1,18 @@ -package SL::DB::Helpers::Metadata; +package SL::DB::Helper::Metadata; use strict; use Rose::DB::Object::Metadata; -use SL::DB::Helpers::ConventionManager; +use SL::DB::Helper::ConventionManager; use base qw(Rose::DB::Object::Metadata); sub convention_manager_class { - return 'SL::DB::Helpers::ConventionManager'; + return 'SL::DB::Helper::ConventionManager'; } sub default_manager_base_class { - return 'SL::DB::Helpers::Manager'; + return 'SL::DB::Helper::Manager'; } sub initialize { diff --git a/SL/DB/Helpers/Sorted.pm b/SL/DB/Helper/Sorted.pm similarity index 98% rename from SL/DB/Helpers/Sorted.pm rename to SL/DB/Helper/Sorted.pm index d5c27728a..9442c842e 100644 --- a/SL/DB/Helpers/Sorted.pm +++ b/SL/DB/Helper/Sorted.pm @@ -1,4 +1,4 @@ -package SL::DB::Helpers::Sorted; +package SL::DB::Helper::Sorted; use strict; @@ -80,14 +80,14 @@ __END__ =head1 NAME -SL::DB::Helpers::Sorted - Mixin for a manager class that handles +SL::DB::Helper::Sorted - Mixin for a manager class that handles sorting of database records =head1 SYNOPSIS package SL::DB::Manager::Message; - use SL::DB::Helpers::Sorted; + use SL::DB::Helper::Sorted; sub _sort_spec { return ( columns => { recipient_id => [ 'CASE diff --git a/SL/DB/Manager/DeliveryOrder.pm b/SL/DB/Manager/DeliveryOrder.pm index f63987e88..1b76830ad 100644 --- a/SL/DB/Manager/DeliveryOrder.pm +++ b/SL/DB/Manager/DeliveryOrder.pm @@ -2,8 +2,8 @@ package SL::DB::Manager::DeliveryOrder; use strict; -use SL::DB::Helpers::Manager; -use base qw(SL::DB::Helpers::Manager); +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); sub object_class { 'SL::DB::DeliveryOrder' } diff --git a/SL/DB/Manager/Employee.pm b/SL/DB/Manager/Employee.pm index e52eebb1f..6577c7757 100644 --- a/SL/DB/Manager/Employee.pm +++ b/SL/DB/Manager/Employee.pm @@ -2,8 +2,8 @@ package SL::DB::Manager::Employee; use strict; -use SL::DB::Helpers::Manager; -use base qw(SL::DB::Helpers::Manager); +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); sub object_class { 'SL::DB::Employee' } diff --git a/SL/DB/Manager/Invoice.pm b/SL/DB/Manager/Invoice.pm index 025f7f2d4..c3a9a7bb4 100644 --- a/SL/DB/Manager/Invoice.pm +++ b/SL/DB/Manager/Invoice.pm @@ -2,7 +2,7 @@ package SL::DB::Manager::Invoice; use strict; -use base qw(SL::DB::Helpers::Manager); +use base qw(SL::DB::Helper::Manager); sub object_class { 'SL::DB::Invoice' } diff --git a/SL/DB/Manager/Order.pm b/SL/DB/Manager/Order.pm index 451a43aaf..fc2b796ba 100644 --- a/SL/DB/Manager/Order.pm +++ b/SL/DB/Manager/Order.pm @@ -2,8 +2,8 @@ package SL::DB::Manager::Order; use strict; -use SL::DB::Helpers::Manager; -use base qw(SL::DB::Helpers::Manager); +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); sub object_class { 'SL::DB::Order' } diff --git a/SL/DB/Manager/Part.pm b/SL/DB/Manager/Part.pm index 1564b9b79..e6aca1f71 100644 --- a/SL/DB/Manager/Part.pm +++ b/SL/DB/Manager/Part.pm @@ -2,8 +2,8 @@ package SL::DB::Manager::Part; use strict; -use SL::DB::Helpers::Manager; -use base qw(SL::DB::Helpers::Manager); +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); use Carp; use SL::DBUtils; diff --git a/SL/DB/Manager/PurchaseInvoice.pm b/SL/DB/Manager/PurchaseInvoice.pm index c717a047f..1cc573795 100644 --- a/SL/DB/Manager/PurchaseInvoice.pm +++ b/SL/DB/Manager/PurchaseInvoice.pm @@ -2,8 +2,8 @@ package SL::DB::Manager::PurchaseInvoice; use strict; -use SL::DB::Helpers::Manager; -use base qw(SL::DB::Helpers::Manager); +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); sub object_class { 'SL::DB::PurchaseInvoice' } diff --git a/SL/DB/Manager/TransferType.pm b/SL/DB/Manager/TransferType.pm index 82bcc5fa1..2b4f1e6c0 100644 --- a/SL/DB/Manager/TransferType.pm +++ b/SL/DB/Manager/TransferType.pm @@ -2,7 +2,7 @@ package SL::DB::Manager::TransferType; use strict; -use base qw(SL::DB::Helpers::Manager); +use base qw(SL::DB::Helper::Manager); use Carp; diff --git a/SL/DB/Object.pm b/SL/DB/Object.pm index 5e58ed958..0a698268c 100644 --- a/SL/DB/Object.pm +++ b/SL/DB/Object.pm @@ -7,9 +7,9 @@ use Rose::DB::Object; use List::MoreUtils qw(any); use SL::DB; -use SL::DB::Helpers::Attr; -use SL::DB::Helpers::Metadata; -use SL::DB::Helpers::Manager; +use SL::DB::Helper::Attr; +use SL::DB::Helper::Metadata; +use SL::DB::Helper::Manager; use base qw(Rose::DB::Object); @@ -31,7 +31,7 @@ sub init_db { } sub meta_class { - return 'SL::DB::Helpers::Metadata'; + return 'SL::DB::Helper::Metadata'; } sub _get_manager_class { diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 143551f74..a6f7ef48c 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -730,9 +730,9 @@ sub gl_transaction { if ($::use_rdbo) { eval { - require SL::DB::Helpers::Mappings; + require SL::DB::Helper::Mappings; sub db { - goto &SL::DB::Helpers::Mappings::db; + goto &SL::DB::Helper::Mappings::db; } } or die $@; } diff --git a/scripts/rose_auto_create_model.pl b/scripts/rose_auto_create_model.pl index b1a704089..f222cfa97 100755 --- a/scripts/rose_auto_create_model.pl +++ b/scripts/rose_auto_create_model.pl @@ -18,8 +18,8 @@ use SL::DB; use SL::Form; use SL::Locale; use SL::LXDebug; -use SL::DB::Helpers::ALL; -use SL::DB::Helpers::Mappings; +use SL::DB::Helper::ALL; +use SL::DB::Helper::Mappings; our $form; our $cgi; @@ -131,8 +131,8 @@ CODE setup(); -my %blacklist = SL::DB::Helpers::Mappings->get_blacklist; -my %package_names = SL::DB::Helpers::Mappings->get_package_names; +my %blacklist = SL::DB::Helper::Mappings->get_blacklist; +my %package_names = SL::DB::Helper::Mappings->get_package_names; my @tables = (); if (($ARGV[0] eq '--all') || ($ARGV[0] eq '-a') || ($ARGV[0] eq '--sugar') || ($ARGV[0] eq '-s')) { diff --git a/t/helper/mapping.t b/t/helper/mapping.t index d0c015cf6..96a8f038d 100644 --- a/t/helper/mapping.t +++ b/t/helper/mapping.t @@ -1,7 +1,7 @@ use Test::More tests => 12; -use_ok 'SL::DB::Helpers::ALL'; -use_ok 'SL::DB::Helpers::Mappings', qw(db); +use_ok 'SL::DB::Helper::ALL'; +use_ok 'SL::DB::Helper::Mappings', qw(db); is db('part'), 'SL::DB::Part'; is db('parts'), 'SL::DB::Manager::Part'; -- 2.20.1