[Jifty-commit] r2189 - in jifty/trunk: lib/Jifty t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Nov 21 17:07:28 EST 2006


Author: jesse
Date: Tue Nov 21 17:07:27 2006
New Revision: 2189

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/DateTime.pm
   jifty/trunk/t/DateTime.t

Log:
 r45255 at 101:  jesse | 2006-11-21 17:07:13 -0500
 * Removed forced stringification of parameters passed to Jifty::DateTime->new_from_string. (use clone instead to get the results the author wanted)
 


Modified: jifty/trunk/lib/Jifty/DateTime.pm
==============================================================================
--- jifty/trunk/lib/Jifty/DateTime.pm	(original)
+++ jifty/trunk/lib/Jifty/DateTime.pm	Tue Nov 21 17:07:27 2006
@@ -71,10 +71,6 @@
     my $string = shift;
     my $now;
 
-    # Date::Manip does not play nice with string overloaded objects.
-    # Force stringification of any date object
-    $string .= "";
-
     {
         # Date::Manip interprets days of the week (eg, ''monday'') as
         # days within the *current* week. Detect these and prepend

Modified: jifty/trunk/t/DateTime.t
==============================================================================
--- jifty/trunk/t/DateTime.t	(original)
+++ jifty/trunk/t/DateTime.t	Tue Nov 21 17:07:27 2006
@@ -1,12 +1,9 @@
 #!/usr/bin/perl -w
 
-use Jifty::Test tests => 3;
+use Jifty::Test tests => 2;
 
 use_ok 'Jifty::DateTime';
 
 my $date = Jifty::DateTime->new_from_string("2006-05-03 01:23:45");
-my $date_clone = eval {
-    Jifty::DateTime->new_from_string($date);
-};
-is $@, '', "new_from_string() can handle string overloaded objects";
+my $date_clone = $date->clone();
 is $date, $date_clone;


More information about the Jifty-commit mailing list