Aaron Straup Cope > Acme-Test-Weather-0.2 > Acme::Test::Weather

Download:
Acme-Test-Weather-0.2.tar.gz

Dependencies

Annotate this POD (1)

View/Report Bugs
Module Version: 0.2   Source  

NAME ^

Acme::Test::Weather - Test the weather conditions for a user.

SYNOPSIS ^

  use Test::Weather;
  plan tests => 2;

  # You may only install something
  # when it's nice outside.

  &isnt_snowing();
  &isnt_cloudy();

  # output:

  1..2
  ok 1 - it's partly cloudy in Montreal, Canada
  not ok 2 - it's partly cloudy in Montreal, Canada
  #     Failed test (./t/mtl.t at line 5)
  #                   'Partly Cloudy'
  #           matches '(?i-xsm:\bcloudy)'
  # Looks like you failed 1 tests of 2.

DESCRIPTION ^

Test the weather conditions for a user.

The package determines a user's location by looking up their hostname / IP address using the CAIDA::NetGeo::Client package.

Based on the data returned, weather conditions are polled using the Weather::Underground package.

Because, you know, it may be important to your Perl module that it's raining outside...

PACKAGE FUNCTIONS ^

&is_cloudy()

Make sure it is cloudy, but remember the silver lining.

&isnt_cloudy()

No clouds. Not even little fluffy ones.

&is_raining()

Make sure it is raining.

&isnt_raining()

Make sure sure it is not raining.

&is_snowing()

Make sure it is snowing.

&isnt_snowing()

Make sure it is not snowing.

&is_sunny()

Make sure it is sunny.

&isnt_sunny()

Make sure it is not sunny. Why are you so angry?

&eq_celsius($int)

Temperature in degrees Celsius.

&gt_celsius($int)

Cooler than, in degrees Celcius.

&lt_celsius($int)

Warmer than, in degrees Celsius.

&eq_fahrenheit($int)

Temperature, in degrees Fahrenheit.

&gt_fahrenheit($int)

Warmer than, in degrees Fahrenheit.

&lt_fahrenheit($int)

Cooler than, in degrees Fahrenheit.

&eq_humidity($int)

Humidity.

&gt_humidity($int)

Humidity is greater than.

&lt_humidity($int)

Humidity is less than.

VERSION ^

0.2

DATE ^

$Date: 2003/02/21 19:25:34 $

AUTHOR ^

Aaron Straup Cope

SEE ALSO ^

http://www.caida.org/tools/utilities/netgeo/NGAPI/index.xml

Weather::Underground

http://search.cpan.org/dist/Acme

SHOUT-OUTS ^

It's all Kellan's fault.

BUGS ^

Not hard to imagine.

Please report all bugs via http://rt.cpan.org

LICENSE ^

Copyright (c) 2003, Aaron Straup Cope. All Rights Reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself

syntax highlighting: