Geo-WeatherNOAA

 view release on metacpan or  search on metacpan

WeatherNOAA.pm  view on Meta::CPAN


sub get_url {
    my ($URL, $UA) = @_;

	$URL or die "No URL to get!";

    # Create the useragent and get the data
    #
    if (! $UA) {
		$UA = new LWP::UserAgent;
		if ( $ENV{'HTTP_PROXY'} or $ENV{'http_proxy'} ) {
        	$UA->env_proxy;
		}
    }
    $UA->agent("WeatherNOAA/$VERSION");
    
    # Create a request
    my $req = new HTTP::Request GET => $URL;
    my $res = $UA->request($req);
    if ($res->is_success) {	
		return $res->content;



( run in 1.294 second using v1.01-cache-2.11-cpan-71847e10f99 )