[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1643] trunk/LedgerSMB/DBObject.pm



Revision: 1643
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1643&view=rev
Author:   tetragon
Date:     2007-09-22 08:14:55 -0700 (Sat, 22 Sep 2007)

Log Message:
-----------
For now, allow both hashref and hash args to constructor

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject.pm

Modified: trunk/LedgerSMB/DBObject.pm
===================================================================
--- trunk/LedgerSMB/DBObject.pm	2007-09-22 00:24:40 UTC (rev 1642)
+++ trunk/LedgerSMB/DBObject.pm	2007-09-22 15:14:55 UTC (rev 1643)
@@ -60,7 +60,7 @@
 
 sub new {
     my $class = shift @_;
-    my %args  = @_;
+    my %args  = (ref($_[0]) eq 'HASH')? %{$_[0]}: @_;
     my $base  = $args{base};
     my $mode  = $args{copy};
     my $self  = bless {}, $class;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.