Acme-Test-Weather

 view release on metacpan or  search on metacpan

lib/Acme/Test/Weather.pm  view on Meta::CPAN

=cut

sub eq_humidity {
  $test->cmp_ok($data->{humidity},"==",$_[0],&_humidity());
}

=head2 &gt_humidity($int)

Humidity is greater than.

=cut

sub gt_humidity { 
  $test->cmp_ok($data->{humidity},">",$_[0],&_humidity());
}

=head2 &lt_humidity($int)

Humidity is less than.

=cut

sub lt_humidity {
  $test->cmp_ok($data->{humidity},"<",$_[0],&_humidity());
}

sub _conditions { return "it's ".lc($data->{conditions})." in $place"; }

sub _humidity { return "the humidity in $place is $data->{humidity}"; }

sub _temp { my $m = shift; return "it $data->{$m} degrees $m in $place"; }

# Stuff I, ahem, borrowed from Test::More

sub plan {
    my(@plan) = @_;

    my $caller = caller;

    $test->exported_to($caller);

    my @imports = ();
    foreach my $idx (0..$#plan) {
        if( $plan[$idx] eq 'import' ) {
            my($tag, $imports) = splice @plan, $idx, 2;
            @imports = @$imports;
            last;
        }
    }

    $test->plan(@plan);

    __PACKAGE__->_export_to_level(1, __PACKAGE__, @imports);
}

sub _export_to_level
{
      my $pkg = shift;
      my $level = shift;
      (undef) = shift;                  # redundant arg
      my $callpkg = caller($level);
      $pkg->export($callpkg, @_);
}

=head1 VERSION

0.2

=head1 DATE

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

=head1 AUTHOR

Aaron Straup Cope

=head1 SEE ALSO

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

L<Weather::Underground>

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

=head1 SHOUT-OUTS

It's all Kellan's fault.

=head1 BUGS

Not hard to imagine.

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

=head1 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

=cut

return 1;



( run in 2.125 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )