Re: DateTime::Event::Sunrise Beta number 3
Hill, Ronald wrote: No, it is not CVS. This is the way it was in the Astro::Sunrise module I can't remember where I got it from. $VERSION = (qw$Revision: 0.01 $)[1]; Thanks John!! I have changed the module to use this syntax Except that if you are not using CVS, there is no reason to do it at all. Just use $VERSION = "0.01"; instead; the "$Revision: 9.99 $" stuff is the allow CVS to automatically increment the revision when you commit a new version to the repository. It has no functionality at all outside of CVS. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748
RE: DateTime::Event::Sunrise Beta number 3
> > Dave Rolsky wrote: > > > > $VERSION = qw($Revision: 0.01 $) [1]; > > > > That's not CVS, is it? If it is, please don't use it's > revision numbers > > directly (this is discussed in the dev docs I wrote). No, it is not CVS. This is the way it was in the Astro::Sunrise module I can't remember where I got it from. > > And even if Dave hadn't prohibited that mode of operation, > the above code is not > backwards compatible to 5.005_03, which emulates qw() using > split. This would > be correct, though (note the movement of the parens): > > $VERSION = (qw$Revision: 0.01 $)[1]; Thanks John!! I have changed the module to use this syntax > > although this is even better (IMNSHO): > > use version; > $VERSION = new version qw$Revision: 0.01 $; > > see > > http://search.cpan.org/author/JPEACOCK/version-0.28/ > > John
Re: DateTime::Event::Sunrise Beta number 3
Dave Rolsky wrote: $VERSION = qw($Revision: 0.01 $) [1]; That's not CVS, is it? If it is, please don't use it's revision numbers directly (this is discussed in the dev docs I wrote). And even if Dave hadn't prohibited that mode of operation, the above code is not backwards compatible to 5.005_03, which emulates qw() using split. This would be correct, though (note the movement of the parens): $VERSION = (qw$Revision: 0.01 $)[1]; although this is even better (IMNSHO): use version; $VERSION = new version qw$Revision: 0.01 $; see http://search.cpan.org/author/JPEACOCK/version-0.28/ John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748
Re: DateTime::Event::Sunrise Beta number 3
On Tue, 25 Mar 2003, Hill, Ronald wrote: > my $sunrise = DateTime::Event::Sunrise ->new( > Longitude =>'-118' , >Latitude => '33', > ); For consistency with other DateTime modules, it'd be good if the parameter names were lower case. A couple others nits: $VERSION = qw($Revision: 0.01 $) [1]; That's not CVS, is it? If it is, please don't use it's revision numbers directly (this is discussed in the dev docs I wrote). Otherwise it looks good to me. -dave /*=== House Absolute Consulting www.houseabsolute.com ===*/
DateTime::Event::Sunrise Beta number 3
Hi All, I have just completed the third beta for the Sunrise module. I have added a set method (no documentation yet)I used the set API from Rick's easter module (Thanks Rick!!)Here is the perl script I used to test: #!/usr/bin/perl use strict; use warnings; use DateTime; use DateTime::Event::Sunrise; my $dt1 = DateTime->new( year => 2000, month => 6, day=> 20, ); my $dt2 = DateTime->new( year => 2000, month => 11, day=> 20, ); my $sunrise = DateTime::Event::Sunrise ->new( Longitude =>'-118' , Latitude => '33', ); my @set = $sunrise->set(from=>$dt1, to=>$dt2, inclusive=>0); foreach my $tmp(@set) { $tmp->set_time_zone( 'America/Los_Angeles' ); print $tmp->datetime ."\n"; } This will be the last beta for this. Unless there is an API change request. Any problems please let me know. Thanks Ron Hill Sunrise.pm Description: Binary data