diff options
author | aurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-12 21:33:42 +0000 |
---|---|---|
committer | aurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-12 21:33:42 +0000 |
commit | 94de37d5281facd3db21d0356a2c9962f9e55e7d (patch) | |
tree | d1a9f6b0d36133d023192ffb2a1699254299087a | |
parent | 975c00a13c4695f1d3c0ac727e4bedd2d937a8b3 (diff) |
Fixes to location.pm, to correct problems with strict and lack of namespacing of $ref and $self.
addition of require lsmb-request to admin.pl and customer.pl
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1579 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/Location.pm | 14 | ||||
-rw-r--r-- | scripts/admin.pl | 4 | ||||
-rw-r--r-- | scripts/customer.pl | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/LedgerSMB/Location.pm b/LedgerSMB/Location.pm index cbd2fe9e..790b7050 100644 --- a/LedgerSMB/Location.pm +++ b/LedgerSMB/Location.pm @@ -59,21 +59,27 @@ sub AUTOLOAD { } sub save { - $ref = shift @{ $self->exec_method( procname => "location_save" ) }; + my $self = shift; + my $ref = shift @{ $self->exec_method( procname => "location_save" ) }; $self->merge( $ref, 'id' ); } sub get { - $ref = shift @{ $self->exec_method( procname => 'location_get' ) }; + my $self = shift; + my $ref = shift @{ $self->exec_method( procname => 'location_get' ) }; $self->merge( $ref, keys %{$ref} ); } sub search { - $self->{search_results} = + my $self = shift; + my $self->{search_results} = $self->exec_method( procname => 'location_search' ); } sub list_all { - $self->{search_results} = + my $self = shift; + my $self->{search_results} = $self->exec_method( procname => 'location_list_all' ); } + +1;
\ No newline at end of file diff --git a/scripts/admin.pl b/scripts/admin.pl index 64fefcb9..55b87a1a 100644 --- a/scripts/admin.pl +++ b/scripts/admin.pl @@ -1,4 +1,6 @@ -package LedgerSMB::Scripts::Admin; +package LedgerSMB::Scripts::admin; + +require '../lsmb-request.pl'; use LedgerSMB::Template; use LedgerSMB::DBObject::Admin; diff --git a/scripts/customer.pl b/scripts/customer.pl index c684c7e6..c89cd5c5 100644 --- a/scripts/customer.pl +++ b/scripts/customer.pl @@ -22,6 +22,8 @@ package LedgerSMB::Scripts::customer; use LedgerSMB::Template; use LedgerSMB::DBObject::Customer; +require '../lsmb-request.pl'; + =pod =over |