--- libweather-com-perl-0.5.3.orig/MANIFEST +++ libweather-com-perl-0.5.3/MANIFEST @@ -5,7 +5,7 @@ MANIFEST README TODO -lib/Weather/Com.pm +lib/Weather/Com.pod lib/Weather/Com/AirPressure.pm lib/Weather/Com/Base.pm lib/Weather/Com/Cached.pm --- libweather-com-perl-0.5.3.orig/Changes +++ libweather-com-perl-0.5.3/Changes @@ -1,8 +1,5 @@ Revision history for Perl extension Weather::Com. -$Revision: 1.23 $ - -0.5.3 Thu Nov 22 20:00 2007 - - FIXED BUG #30869: Cannot install via CPAN shell +$Revision: 1.22 $ 0.5.2 Mon Jul 09 21:39 2007 - FIXED BUG #26126: Timeout did not work due to typo @@ -80,7 +77,7 @@ So we'll get some structure in it. This will be usefull if one wants to write some other caching package, we than can tell it Weather::Com::Cached::MySQL for example, etc. - - added automated version information (using the CVS $Revision: 1.23 $ tag) + - added automated version information (using the CVS $Revision: 1.22 $ tag) to all packages - added consistency checking for paramters passed to Weather::Com - Weather::Com now only accepts paths to put the cache in if it is --- libweather-com-perl-0.5.3.orig/Makefile.PL +++ libweather-com-perl-0.5.3/Makefile.PL @@ -5,7 +5,7 @@ # the contents of the Makefile that is written. WriteMakefile( NAME => 'Weather::Com', - VERSION => '0.5.3', # sets $VERSION + VERSION => '0.5.2', # sets $VERSION PREREQ_PM => { Data::Dumper => "", Locale::Maketext => "", @@ -21,7 +21,7 @@ ? ## Add these new keywords supported since 5.005 ( ABSTRACT_FROM => - 'lib/Weather/Com.pm', # retrieve abstract from module + 'lib/Weather/Com.pod', # retrieve abstract from module AUTHOR => 'Thomas Schnuecker ' ) : () --- libweather-com-perl-0.5.3.orig/META.yml +++ libweather-com-perl-0.5.3/META.yml @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Weather-Com -version: 0.5.3 +version: 0.5.2 version_from: installdirs: site requires: --- libweather-com-perl-0.5.3.orig/lib/Weather/Com.pod +++ libweather-com-perl-0.5.3/lib/Weather/Com.pod @@ -0,0 +1,396 @@ +package Weather::Com; + +our $VERSION = sprintf "%d.%03d", q$Revision: 1.14 $ =~ /(\d+)/g; + +1; + +__END__ + +=pod + +=head1 NAME + +Weather::Com - fetching weather information from I + +=head1 SYNOPSIS + + #!/usr/bin/perl -w + use Weather::Com::Finder; + + # you have to fill in your ids from weather.com here + my $PartnerId = 'somepartnerid'; + my $LicenseKey = 'mylicense'; + + my %weatherargs = ( + 'partner_id' => $PartnerId, + 'license' => $LicenseKey, + 'language' => 'de', + ); + + my $weather_finder = Weather::Com::Finder->new(%weatherargs); + + my @locations = $weather_finder->find('Heidelberg'); + + foreach my $location (@locations) { + print "Found weather for city: ", $location->name(), "\n"; + print "Current Conditions are ", + $location->current_conditions()->description(), "\n"; + } + +=head1 DESCRIPTION + +I provides three interfaces to access weather +information from I. + +Except from the main high level interface, there is also +a simple, very easy to use one called I. +And if you want, you can also use the low level +interface that is the basis for the two high level interfaces, +directly (I or even I). + +Please refer to the POD of these modules directly for detailed +information. + +The data provided by I and made accessible by this OO +interface can be used for free under special terms. Please have a look +at the application programming guide of I +L + +=head1 LOCALIZATION + +Weather-Com uses I for the l10n. Foreach language there +has to be package I (e.g. I). + +Localization is new with version 0.4 of Weather-Com. Therefore, there are not too +many languages supported, yet. If one wants to create such a language definition package +for a language that is not part of this module, please do the following: + +=over 4 + +=item 1. + +check my homepage to verify that the language package has not been created by someone +else, yet (L). + +=item 2. + +contact me to verify if anybody else already is already translating into this language + +=item 3. + +just do it and send me your new language package. It then will be first put onto my +website for download and then it will be part of the next release. + +=back + +=head2 Dynamic Language Support + +With version 0.5 of Weather-Com I have introduced a new feature called +I. + +The language for all textual attributes that usually are translated in your default +language you chose while creating your C instance can now +dynamically be changed on a I. + +Have a look at this example: + + #!/usr/bin/perl -w + use Weather::Com::Finder; + + # you have to fill in your ids from weather.com here + my $PartnerId = 'somepartnerid'; + my $LicenseKey = 'mylicense'; + + my %weatherargs = ( + 'partner_id' => $PartnerId, + 'license' => $LicenseKey, + 'language' => 'en', + ); + + my $weather_finder = Weather::Com::Finder->new(%weatherargs); + + my @locations = $weather_finder->find('Heidelberg'); + + foreach my $location (@locations) { + print "Found weather for city: ", $location->name(), "\n"; + print "Current Conditions are ", + $location->current_conditions()->description(), "\n"; + + # HERE WE USE DYNAMIC LANGUAGE SUPPORT + print "That is in German: ", + $location->current_conditions()->description('de'), "\n"; + } + +As you can see in this example, you can provide a language tag to +a method that returns textual information. + +If you want to find out if the I is already +implemented for a specific attribute of one Weather-Com class, have +a look at the corresponding packages POD. + +=head1 TUTORIAL + +The usual way to use the I module would be to instantiate +a I that allows you to search for a location +by a search string or postal code or whatever I may +understand. + +The finder returns an arrayref or an array of locations (depending on +how you call the C method). Each location is an object of +I. + +The locations consist of location specific data, +a I object, a I +object and a I object. + +=head2 Configuration parameters + +You will need a configuration hash to instantiate a I +object. Except of the I and the I all parameters are +optional and have sensible defaults. + + use Weather::Com::Finder; + + my %config = ( + partner_id => 'somepartnerid', # mandatory + license => 'somelicensekey' # mandatory + language => 'de', + units => 's', + cache => '/tmp/weather', + timeout => 300, + debug => 1, + proxy => 'http://some.proxy.de:8080', + proxy_user => 'myaccount', + proxy_pass => 'myproxy_pass' + ); + +The valid parameters are: + +=over 4 + +=item partner_id => 'somepartnerid' + +To be allowed to fetch weather information from I you need to +register (free of charge) to get a so called I and a +I. + +=item license => 'somelicensekey' + +See I. + +=item language => 'somelanguagecode' + +I returns some textual data to describe the weather +conditions, uv index, moon phase, wind direction, etc. + +If one specifies a valid language as configuration parameter, this +textual descriptions are translated into that language. If one specifies +a language for that there's no translation, the objects will return the +english texts. + +=item cache => '/any/path' + +Maybe you want to define a special path to put the cache files into. +The cache directory defaults to ".". + +=item units => s | m + +This parameter defines whether to fetch information in metric (m) or +US (s) format. + +Defaults to 'm'. + +=item timeout => some integer (in seconds) + +The timeout for I to get an HTTP request done usually is set to +180s. If you need a longer timeout or for some reasons a shorter one you can +set this here. + +Defaults to 180 seconds. + +=item debug => 0 | 1 + +Set debugging on/off. + +Defaults to 0 (off). + +=item proxy => 'none' | 'http://some.proxy.de:8080' + +Usually no proxy is used by the I module used to communicate +with I. If you want to use an HTTP proxy you can specify one here. + +=item proxy_user => undef | 'myuser' + +If specified, this parameter is provided to the proxy for authentication +purposes. + +Defaults to I. + +=item proxy_pass => undef | 'mypassword' + +If specified, this parameter is provided to the proxy for authentication +purposes. + +Defaults to I. + +=back + +=head2 Weather::Com::Finder + +Usually one would start by searching for a location. This is done by +instantiating a I object providing all necessary +information about the I license, the proxy if one is needed, +etc. + + my $finder = Weather::Com::Finder->new(%config); + +Then you call the finders C method to search for locations whose +name or whose postal code matches against the searchstring. The finder then +returns an array (or arrayref) of I objects. + + # if you want an array of locations: + my @locations = $finder->find('Heidelberg'); + + # or if you prefer an arrayref: + my $locations = $finder->find('Heidelberg'); + +For further information please refer to L. + +=head2 Weather::Com::Location + +The I object contains information about the location +itself (longitude, latitude, current local time, etc.), a I +object that contains all information about the units of messures currently used with +this location, and a I object containing the +current weather conditions of the location. + + foreach my $location (@locations) { + print "Found location with name: ", $location->name(), "\n"; + print "The longitude of this location is: ", $location->longitude(), "\n"; + } + +All information in the I object is updated with each single +call of one of its methods corresponding to the caching rules implemented in +I. + +For detailed information about the I class please refer to +L. + +=head2 Weather::Com::Units + +The units class provides all units of measure corresponding to the data of the +location object. You'll get an instance of this class by calling the C +method of your location object. + +For detailed information about the I class please refer to +L. + +=head2 Weather::Com::CurrentConditions + +Each location has a I object accessible via +its C method. + + my $conditions = $location->current_conditions(); + print "Current temperature is ", $conditions->temperature(), "°C\n"; + print "but it feels like ", $conditions->windchill(), "°C!\n"; + +Anytime you call a method of your I object, +its data is refreshed automatically if needed according to the caching rules. + +For detailed information about this class please refer to +L. + +=head2 Weather::Com::Forecast + +Each location has a I object to access weather +forecasts. I provides up to 9 days of forecast - or 10 days +if one wants to count day 0 which is I in most cases. + + my $forecast = $location->forecast(); + print "Max. temperature tomorrow will be ", $forecast->day(1)->high(), "°C\n"; + +Any time you call a method of your I object, forecast data +is updated if necessary. + +For detailed information about this class please refer to +L. + +=head2 Other classes + +There are a some other classes that are used to represent groups of +weather data like wind (speed, direction, etc.), UV index, air pressure, etc. + +Objects of these classes belong to objects of class I or +I that will be introduced with the next release. These +objects data will only refresh when you call the corresponding method of the parent object. + +For detailed information about these classes please refer to their own POD. + +Classes available with this version are: + +=head3 Weather::Com::AirPressure + +Provides access to the barometric pressure data. + +For detailed information about this class please refer to +L. + +=head3 Weather::Com::UVIndex + +Provides access to the uv index of the parent object. + +For detailed information about this class please refer to +L. + +=head3 Weather::Com::Wind + +Provides access to wind speed, maximum gust, direction in degrees, etc. + +=head1 EXTENSIONS + +If you plan to extend these module, e.g. with some other caching mechanisms, +please contact me. Perhaps we can add your stuff to this module. + +=head1 SEE ALSO + +=head2 Detailed documentation of the main interface + +L, L, L, +L, L, +L, L + +=head2 Detailed documentation of the I API + +L + +=head2 Detailed documentation of the low level interface + +L and L + +=head1 BUGS/SUPPORT/PRE-RELEASES + +If you want to report a bug, please use the CPAN bug reporting tool. + +If you have any question, suggestion, feature request, etc. please use the +CPAN forum. + +If you are looking for fixes, pre-releases, etc. have a look at my website +L. + +=head1 AUTHOR + +Thomas Schnuecker, Ethomas@schnuecker.deE + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2004-2007 by Thomas Schnuecker + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +The data provided by I and made accessible by this OO +interface can be used for free under special terms. +Please have a look at the application programming guide of +I (L) + +=cut \ No newline at end of file --- libweather-com-perl-0.5.3.orig/debian/watch +++ libweather-com-perl-0.5.3/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://cpan.noris.de/authors/id/S/SC/SCHNUECK/Weather-Com-([\d\.]+).tar.gz --- libweather-com-perl-0.5.3.orig/debian/copyright +++ libweather-com-perl-0.5.3/debian/copyright @@ -0,0 +1,20 @@ +The original/upstream tarball can be downloaded from +http://search.cpan.org/CPAN/authors/id/S/SC/SCHNUECK/Weather-Com-0.5.tar.gz + +Copyright (C) 2004-2005 by Thomas Schnuecker (thomas@schnuecker.de) + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +Perl is distributed under your choice of the GNU General Public License or +the Artistic License. On Debian GNU/Linux systems, the complete text of the +GNU General Public License can be found in `/usr/share/common-licenses/GPL' +and the Artistic Licence in `/usr/share/common-licenses/Artistic'. + +The data provided by weather.com and made accessible by this OO +interface can be used for free under special terms. + +Please register at http://www.weather.com/services/xmloap.html, download +the SDK and have a look at the application programming guide for further +information about legal issues. + --- libweather-com-perl-0.5.3.orig/debian/compat +++ libweather-com-perl-0.5.3/debian/compat @@ -0,0 +1 @@ +4 --- libweather-com-perl-0.5.3.orig/debian/rules +++ libweather-com-perl-0.5.3/debian/rules @@ -0,0 +1,86 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# If set to a true value then MakeMaker's prompt function will +# always return the default without waiting for user input. +export PERL_MM_USE_DEFAULT=1 + +PACKAGE=$(shell dh_listpackages) + +ifndef PERL +PERL = /usr/bin/perl +endif + +TMP =$(CURDIR)/debian/$(PACKAGE) + +build: build-stamp patch +build-stamp: + dh_testdir + + # Add commands to compile the package here + $(PERL) Makefile.PL INSTALLDIRS=vendor + $(MAKE) OPTIMIZE="-Wall -O2 -g" + + touch build-stamp + +clean: clean1 unpatch +clean1: + dh_testdir + dh_testroot + + # Add commands to clean up after the build process here + [ ! -f Makefile ] || $(MAKE) distclean + [ ! -f locations.dat ] || $(RM) locations.dat + + dh_clean build-stamp install-stamp + +install: build install-stamp +install-stamp: + dh_testdir + dh_testroot + dh_clean -k + + # Add commands to install the package into debian/$PACKAGE_NAME here + $(MAKE) test + $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr + + # As this is a architecture independent package, we are not + # supposed to install stuff to /usr/lib. MakeMaker creates + # the dirs, we delete them from the deb: + [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5 + + touch install-stamp + +binary-arch: +# We have nothing to do by default. + +binary-indep: build install + dh_testdir + dh_testroot + dh_installexamples samples/* + dh_installdocs README + dh_installchangelogs Changes + dh_perl + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +patch: patch-stamp +patch-stamp: + dpatch apply-all + dpatch cat-all >patch-stamp + touch patch-stamp + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary patch unpatch + --- libweather-com-perl-0.5.3.orig/debian/control +++ libweather-com-perl-0.5.3/debian/control @@ -0,0 +1,17 @@ +Source: libweather-com-perl +Section: perl +Priority: optional +Build-Depends-Indep: perl (>= 5.8.0), libwww-perl, libxml-simple-perl, libtime-format-perl +Build-Depends: debhelper (>= 4.0.2), dpatch (>= 2) +Maintainer: Christoph Haas +Standards-Version: 3.7.3 + +Package: libweather-com-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libtime-format-perl, libwww-perl, libxml-simple-perl +Description: CPAN's Weather::Com module for fetching data from weather.com + Weather-Com is meant to be a module suite enabling the perl programmer to + access weather information as provided by weather.com's XOAP interface. + . + Notice: To use the weather.com's service you have to register at weather.com + first and accept their terms of service. --- libweather-com-perl-0.5.3.orig/debian/changelog +++ libweather-com-perl-0.5.3/debian/changelog @@ -0,0 +1,44 @@ +libweather-com-perl (0.5.3-2) unstable; urgency=low + + * Acknoledged NMU. + * Added patch for fixing http://rt.cpan.org/Public/Bug/Display.html?id=35681 + + -- Christoph Haas Thu, 29 May 2008 20:32:22 +0200 + +libweather-com-perl (0.5.3-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS with Perl 5.10. Closes: #467776 + + -- Mark Hymers Sat, 05 Apr 2008 21:08:58 +0100 + +libweather-com-perl (0.5.3-1) unstable; urgency=low + + * New upstream release + + -- Christoph Haas Sat, 09 Feb 2008 12:13:53 +0100 + +libweather-com-perl (0.5.2-1) unstable; urgency=low + + * New upstream release (closes: #451448) + + -- Christoph Haas Sun, 18 Nov 2007 19:30:54 +0100 + +libweather-com-perl (0.5.0-2) unstable; urgency=low + + * Added dependency on libxml-simple-perl. (closes #387622) + + -- Christoph Haas Sat, 16 Sep 2006 08:38:06 +0200 + +libweather-com-perl (0.5.0-1) unstable; urgency=low + + * New upstream release + + -- Christoph Haas Tue, 3 Jan 2006 21:46:48 +0100 + +libweather-com-perl (0.4.1-1) unstable; urgency=low + + * Initial Release. + + -- Christoph Haas Fri, 15 Jul 2005 23:30:43 +0200 + --- libweather-com-perl-0.5.3.orig/debian/patches/00list +++ libweather-com-perl-0.5.3/debian/patches/00list @@ -0,0 +1 @@ +10_links.dpatch --- libweather-com-perl-0.5.3.orig/debian/patches/10_links.dpatch +++ libweather-com-perl-0.5.3/debian/patches/10_links.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_links.dpatch by Christoph Haas +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad libweather-com-perl-0.5.3~/lib/Weather/Com/Base.pm libweather-com-perl-0.5.3/lib/Weather/Com/Base.pm +--- libweather-com-perl-0.5.3~/lib/Weather/Com/Base.pm 2007-07-09 21:57:24.000000000 +0200 ++++ libweather-com-perl-0.5.3/lib/Weather/Com/Base.pm 2008-05-29 20:44:06.000000000 +0200 +@@ -97,7 +97,7 @@ + $self->{UNITS} = 'm'; # could be 'm' for metric or 's' for us standard + $self->{CC} = 0; # show current conditions true/false + $self->{FORECAST} = 0; # multi day forecast 0 = no, 1..10 days +- $self->{LINKS} = 0; ++ $self->{LINKS} = 1; + + # save params for further use + $self->{ARGS} = \%parameters;