From 79dba89d3df0d1579e64ce20d13a058d83e218f9 Mon Sep 17 00:00:00 2001 From: "Mateu X. Hunter" Date: Mon, 25 Jul 2011 16:41:37 -0600 Subject: [PATCH] use default property instead of lazy builder to prevent empty string in CPAN test. --- lib/Weather/Underground/Forecast.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/Weather/Underground/Forecast.pm b/lib/Weather/Underground/Forecast.pm index 6311564..9238089 100644 --- a/lib/Weather/Underground/Forecast.pm +++ b/lib/Weather/Underground/Forecast.pm @@ -58,7 +58,7 @@ has 'raw_data' => ( has 'source_URL' => ( is => 'ro', isa => 'Any', - lazy_build => 1, + 'default' => 'http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=', ); # When the location changes, we want to clear the data to insure a new data fetch will happen. @@ -192,12 +192,6 @@ sub _build_raw_data { return $content; } -sub _build_source_URL { - my $self = shift; - return - 'http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query='; -} - __PACKAGE__->meta->make_immutable; 1