~ubuntu-branches/ubuntu/natty/libgeo-metar-perl/natty

« back to all changes in this revision

Viewing changes to debian/patches/various.patch

  • Committer: Bazaar Package Importer
  • Author(s): Martín Ferrari
  • Date: 2008-06-13 02:42:42 UTC
  • mfrom: (0.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080613024242-2be2lbxarhx8sglx
Tags: 1.15-1
* New upstream release, new upstream maintainer.
* debian/docs: removed HACKING.
* debian/copyright: updated CP info, plus new format.
* debian/control: added myself to Uploaders, fixed case in short desc. Fix
  incorrect Build-Depends{,-Indep} distribution.
* debian/patches: finally merged all the patches from #304962 and #262397
  with the new upstream release! Also, sent the patches upstream as
  CPAN#36708. (Closes: #304962).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: libgeo-metar-perl/METAR.pm
 
2
===================================================================
 
3
--- libgeo-metar-perl.orig/METAR.pm
 
4
+++ libgeo-metar-perl/METAR.pm
 
5
@@ -364,8 +364,7 @@ sub new
 
6
                                                 # default=METAR
 
7
     $self->{site}          = undef;             # the site code (4 chars)
 
8
     $self->{date_time}     = undef;             # date/time
 
9
-    $self->{modifier}      = "AUTO";            # the AUTO/COR modifier (if
 
10
-                                                # any) default=AUTO
 
11
+    $self->{modifier}      = undef;             # the AUTO/COR modifier
 
12
     $self->{wind}          = undef;             # the wind information
 
13
     $self->{windtype}      = undef;             # the wind speed type (knots/meterpersecond/kilometersperhour)
 
14
     $self->{windvar}       = undef;             # the wind variation
 
15
@@ -1431,8 +1430,11 @@ applications.
 
16
 Here is how you I<might> use the Geo::METAR module.
 
17
 
 
18
 One use that I have had for this module is to query the NWS METAR page
 
19
-(using the LWP modules) at
 
20
-http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=EHSB to get an
 
21
+(using the LWP modules) at:
 
22
+
 
23
+I<http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=EHSB>
 
24
+
 
25
+to get an
 
26
 up-to-date METAR. Then, I scan thru the output, looking for what looks
 
27
 like a METAR string (that's not hard in Perl). Oh, EHSB can be any site
 
28
 location code where there is a reporting station.
 
29
Index: libgeo-metar-perl/t/metar.t
 
30
===================================================================
 
31
--- libgeo-metar-perl.orig/t/metar.t
 
32
+++ libgeo-metar-perl/t/metar.t
 
33
@@ -5,59 +5,19 @@
 
34
 # Test script for METAR installation.
 
35
 
 
36
 use strict;
 
37
-use Test;
 
38
+use Test::More tests => 7;
 
39
 
 
40
-BEGIN { plan tests => 6 }
 
41
+my $modname = "Geo::METAR";
 
42
+my $m;
 
43
 
 
44
-use Geo::METAR;
 
45
-
 
46
-my %tally = (passed => 0, failed => 0, skipped => 0);
 
47
-
 
48
-print "Testing METAR.\n";
 
49
-
 
50
-my $m = new Geo::METAR;
 
51
-
 
52
-# Create a new instance.
 
53
-
 
54
-if (ref $m eq 'Geo::METAR') {
 
55
-    ok(1);
 
56
-} else {
 
57
-    ok(0);
 
58
-}
 
59
-
 
60
-##
 
61
-## Try out one hard-coded example. We need many more of these.
 
62
-##
 
63
-
 
64
-if ($m->metar("KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014")) {
 
65
-    ok(1);
 
66
-} else {
 
67
-    ok(0);
 
68
-}
 
69
-
 
70
-if ($m->SITE eq "KFDY") {
 
71
-    ok(1);
 
72
-} else {
 
73
-    ok(0);
 
74
-}
 
75
-
 
76
-if ($m->DATE eq "25") {
 
77
-    ok(1);
 
78
-} else {
 
79
-    ok(0);
 
80
-}
 
81
-
 
82
-if ($m->MOD eq "AUTO") {
 
83
-    ok(1);
 
84
-} else {
 
85
-    ok(0);
 
86
-}
 
87
-
 
88
-if ($m->TEMP_F eq "39.2") {
 
89
-    ok(1);
 
90
-} else {
 
91
-    ok(0);
 
92
-}
 
93
+use_ok($modname);
 
94
+ok($m = $modname->new());
 
95
+ok(ref $m eq $modname);
 
96
+
 
97
+ok($m->metar("KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014"));
 
98
+ok($m->SITE eq "KFDY");
 
99
+ok($m->DATE eq "25");
 
100
+ok($m->TEMP_F eq "39.2");
 
101
 
 
102
 exit;
 
103