Heyo,

Any chance of set_time_zone() being able to return $self?

I just ask since it would make possible code such as:

my $dt = DateTime->from_epoch( epoch => $then )->set_time_zone( $tz );

Rather than having to split it into two, less associated, lines.

An appropriate patch is attached. Well, except for tests and
documentation. If accepted, I'll happily produce such patches.


cheers,
-- 
Iain.

--- lib/DateTime.pm     11 Mar 2003 03:33:25 -0000      1.107
+++ lib/DateTime.pm     12 Mar 2003 00:27:58 -0000
@@ -731,10 +731,12 @@ sub set_time_zone {
     }
     elsif ( ! $was_floating )
     {
         $self->_calc_local_rd;
     }
+
+    return $self;
 }


 1;

Reply via email to