# # Test data for Weather::Com::Base and ::Cached location search # $NY_HTML = < New York, NY New York/Central Park, NY New York/JFK Intl Arpt, NY New York/La Guardia Arpt, NY END $NY_Hash = { 'USNY0996' => 'New York, NY', 'USNY0998' => 'New York/Central Park, NY', 'USNY0999' => 'New York/JFK Intl Arpt, NY', 'USNY1000' => 'New York/La Guardia Arpt, NY', }; # # HTML returned by a seach for NY, Central Park with 10 days forecast # $NYCP_HTML = < en_US
MEDIUM
C km km/h mb mm New York/Central Park, NY 5:35 PM 40.79 -73.96 6:08 AM 7:42 PM -4 http://www.weather.com/outlook/health/allergies/USNY0998?par=xoap Pollen Reports http://www.weather.com/outlook/travel/flights/citywx/USNY0998?par=xoap Airport Delays http://www.weather.com/outlook/events/special/result/USNY0998?when=thisweek&par=xoap Special Events http://www.weather.com/services/desktop.html?par=xoap Download Desktop Weather 4/21/05 4:51 PM EDT Central Park, NY 14 10 Fair 34 1,014.6 steady 19 29 160 SSE 62 16.1 2 Low 7 12 Waxing Gibbous 4/21/05 5:03 PM EDT N/A 8 6:08 AM 7:42 PM 44 N/A N/A N/A N/A N/A N/A 10 N/A 33 Mostly Clear 13 N/A 153 SSE M Clear 10 55 16 11 6:06 AM 7:43 PM 30 Partly Cloudy 18 N/A 139 SE P Cloudy 10 44 12 Rain 29 N/A 104 ESE Rain 80 69 18 11 6:05 AM 7:44 PM 12 Rain 27 N/A 148 SSE Rain 80 70 11 Light Rain 11 N/A 62 ENE Light Rain 60 61 13 6 6:03 AM 7:45 PM 11 Few Showers 16 N/A 22 NNE Few Showers 30 47 29 Partly Cloudy 8 N/A 349 N P Cloudy 10 53 11 7 6:02 AM 7:46 PM 11 Showers 11 N/A 59 ENE Showers 40 48 29 Partly Cloudy 8 N/A 162 SSE P Cloudy 10 53 13 9 6:01 AM 7:47 PM 30 Partly Cloudy 10 N/A 197 SSW P Cloudy 20 50 33 Mostly Clear 5 N/A 264 W M Clear 10 54 17 11 5:59 AM 7:48 PM 11 Few Showers 10 N/A 106 ESE Few Showers 30 52 12 Rain 10 N/A 170 S Rain 60 60 14 9 5:58 AM 7:49 PM 11 Few Showers 11 N/A 254 WSW Few Showers 30 52 29 Partly Cloudy 10 N/A 240 WSW P Cloudy 20 55 16 10 5:57 AM 7:50 PM 30 Partly Cloudy 13 N/A 237 WSW P Cloudy 20 51 11 Light Rain 8 N/A 284 WNW Light Rain 60 60 17 11 5:56 AM 7:51 PM 11 Light Rain 11 N/A 358 N Light Rain 60 53 29 Partly Cloudy 10 N/A 217 SW P Cloudy 20 58
NYCP # # Hash corresponding to HTML returned by a seach for # NY, Central Park with 10 days forecast # $NYCP_Hash = { 'dayf' => { 'lsup' => '4/21/05 5:03 PM EDT', 'day' => [ { 'hi' => 'N/A', 'suns' => '7:42 PM', 'dt' => 'Apr 21', 'part' => [ { 'hmid' => 'N/A', 'wind' => { 'gust' => 'N/A', 'd' => 'N/A', 's' => 'N/A', 't' => 'N/A' }, 'icon' => '44', 'p' => 'd', 'ppcp' => '10', 'bt' => 'N/A', 't' => 'N/A' }, { 'hmid' => '55', 'wind' => { 'gust' => 'N/A', 'd' => '153', 's' => '13', 't' => 'SSE' }, 'icon' => '33', 'p' => 'n', 'ppcp' => '10', 'bt' => 'M Clear', 't' => 'Mostly Clear' } ], 'd' => '0', 'sunr' => '6:08 AM', 'low' => '8', 't' => 'Thursday' }, { 'hi' => '16', 'suns' => '7:43 PM', 'dt' => 'Apr 22', 'part' => [ { 'hmid' => '44', 'wind' => { 'gust' => 'N/A', 'd' => '139', 's' => '18', 't' => 'SE' }, 'icon' => '30', 'p' => 'd', 'ppcp' => '10', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' }, { 'hmid' => '69', 'wind' => { 'gust' => 'N/A', 'd' => '104', 's' => '29', 't' => 'ESE' }, 'icon' => '12', 'p' => 'n', 'ppcp' => '80', 'bt' => 'Rain', 't' => 'Rain' } ], 'd' => '1', 'sunr' => '6:06 AM', 'low' => '11', 't' => 'Friday' }, { 'hi' => '18', 'suns' => '7:44 PM', 'dt' => 'Apr 23', 'part' => [ { 'hmid' => '70', 'wind' => { 'gust' => 'N/A', 'd' => '148', 's' => '27', 't' => 'SSE' }, 'icon' => '12', 'p' => 'd', 'ppcp' => '80', 'bt' => 'Rain', 't' => 'Rain' }, { 'hmid' => '61', 'wind' => { 'gust' => 'N/A', 'd' => '62', 's' => '11', 't' => 'ENE' }, 'icon' => '11', 'p' => 'n', 'ppcp' => '60', 'bt' => 'Light Rain', 't' => 'Light Rain' } ], 'd' => '2', 'sunr' => '6:05 AM', 'low' => '11', 't' => 'Saturday' }, { 'hi' => '13', 'suns' => '7:45 PM', 'dt' => 'Apr 24', 'part' => [ { 'hmid' => '47', 'wind' => { 'gust' => 'N/A', 'd' => '22', 's' => '16', 't' => 'NNE' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '30', 'bt' => 'Few Showers', 't' => 'Few Showers' }, { 'hmid' => '53', 'wind' => { 'gust' => 'N/A', 'd' => '349', 's' => '8', 't' => 'N' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '10', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '3', 'sunr' => '6:03 AM', 'low' => '6', 't' => 'Sunday' }, { 'hi' => '11', 'suns' => '7:46 PM', 'dt' => 'Apr 25', 'part' => [ { 'hmid' => '48', 'wind' => { 'gust' => 'N/A', 'd' => '59', 's' => '11', 't' => 'ENE' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '40', 'bt' => 'Showers', 't' => 'Showers' }, { 'hmid' => '53', 'wind' => { 'gust' => 'N/A', 'd' => '162', 's' => '8', 't' => 'SSE' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '10', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '4', 'sunr' => '6:02 AM', 'low' => '7', 't' => 'Monday' }, { 'hi' => '13', 'suns' => '7:47 PM', 'dt' => 'Apr 26', 'part' => [ { 'hmid' => '50', 'wind' => { 'gust' => 'N/A', 'd' => '197', 's' => '10', 't' => 'SSW' }, 'icon' => '30', 'p' => 'd', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' }, { 'hmid' => '54', 'wind' => { 'gust' => 'N/A', 'd' => '264', 's' => '5', 't' => 'W' }, 'icon' => '33', 'p' => 'n', 'ppcp' => '10', 'bt' => 'M Clear', 't' => 'Mostly Clear' } ], 'd' => '5', 'sunr' => '6:01 AM', 'low' => '9', 't' => 'Tuesday' }, { 'hi' => '17', 'suns' => '7:48 PM', 'dt' => 'Apr 27', 'part' => [ { 'hmid' => '52', 'wind' => { 'gust' => 'N/A', 'd' => '106', 's' => '10', 't' => 'ESE' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '30', 'bt' => 'Few Showers', 't' => 'Few Showers' }, { 'hmid' => '60', 'wind' => { 'gust' => 'N/A', 'd' => '170', 's' => '10', 't' => 'S' }, 'icon' => '12', 'p' => 'n', 'ppcp' => '60', 'bt' => 'Rain', 't' => 'Rain' } ], 'd' => '6', 'sunr' => '5:59 AM', 'low' => '11', 't' => 'Wednesday' }, { 'hi' => '14', 'suns' => '7:49 PM', 'dt' => 'Apr 28', 'part' => [ { 'hmid' => '52', 'wind' => { 'gust' => 'N/A', 'd' => '254', 's' => '11', 't' => 'WSW' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '30', 'bt' => 'Few Showers', 't' => 'Few Showers' }, { 'hmid' => '55', 'wind' => { 'gust' => 'N/A', 'd' => '240', 's' => '10', 't' => 'WSW' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '7', 'sunr' => '5:58 AM', 'low' => '9', 't' => 'Thursday' }, { 'hi' => '16', 'suns' => '7:50 PM', 'dt' => 'Apr 29', 'part' => [ { 'hmid' => '51', 'wind' => { 'gust' => 'N/A', 'd' => '237', 's' => '13', 't' => 'WSW' }, 'icon' => '30', 'p' => 'd', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' }, { 'hmid' => '60', 'wind' => { 'gust' => 'N/A', 'd' => '284', 's' => '8', 't' => 'WNW' }, 'icon' => '11', 'p' => 'n', 'ppcp' => '60', 'bt' => 'Light Rain', 't' => 'Light Rain' } ], 'd' => '8', 'sunr' => '5:57 AM', 'low' => '10', 't' => 'Friday' }, { 'hi' => '17', 'suns' => '7:51 PM', 'dt' => 'Apr 30', 'part' => [ { 'hmid' => '53', 'wind' => { 'gust' => 'N/A', 'd' => '358', 's' => '11', 't' => 'N' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '60', 'bt' => 'Light Rain', 't' => 'Light Rain' }, { 'hmid' => '58', 'wind' => { 'gust' => 'N/A', 'd' => '217', 's' => '10', 't' => 'SW' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '9', 'sunr' => '5:56 AM', 'low' => '11', 't' => 'Saturday' } ] }, 'head' => { 'ur' => 'mm', 'ud' => 'km', 'us' => 'km/h', 'form' => 'MEDIUM', 'up' => 'mb', 'locale' => 'en_US', 'ut' => 'C', }, 'cc' => { 'icon' => '34', 'flik' => '10', 'obst' => 'Central Park, NY', 'lsup' => '4/21/05 4:51 PM EDT', 'tmp' => '14', 'hmid' => '62', 'wind' => { 'gust' => '29', 'd' => '160', 's' => '19', 't' => 'SSE' }, 'bar' => { 'r' => '1,014.6', 'd' => 'steady' }, 'moon' => { 'icon' => '12', 't' => 'Waxing Gibbous' }, 'dewp' => '7', 'uv' => { 't' => 'Low', 'i' => '2' }, 'vis' => '16.1', 't' => 'Fair' }, 'lnks' => { 'link' => [ { 'l' => 'http://www.weather.com/outlook/health/allergies/USNY0998?par=xoap', 'pos' => '1', 't' => 'Pollen Reports' }, { 'l' => 'http://www.weather.com/outlook/travel/flights/citywx/USNY0998?par=xoap', 'pos' => '2', 't' => 'Airport Delays' }, { 'l' => 'http://www.weather.com/outlook/events/special/result/USNY0998?when=thisweek&par=xoap', 'pos' => '3', 't' => 'Special Events' }, { 'l' => 'http://www.weather.com/services/desktop.html?par=xoap', 'pos' => '4', 't' => 'Download Desktop Weather' } ], 'type' => 'prmo' }, 'loc' => { 'suns' => '7:42 PM', 'zone' => '-4', 'lat' => '40.79', 'tm' => '5:35 PM', 'sunr' => '6:08 AM', 'dnam' => 'New York/Central Park, NY', 'id' => 'USNY0998', 'lon' => '-73.96' }, 'ver' => '2.0' }; # # Hash corresponding to HTML returned by a seach for # NY, Central Park with 10 days forecast # $NYCP_HashCached = { 'dayf' => { 'lsup' => '4/21/05 5:03 PM EDT', 'cached' => '1110000000', 'day' => [ { 'hi' => 'N/A', 'suns' => '7:42 PM', 'dt' => 'Apr 21', 'part' => [ { 'hmid' => 'N/A', 'wind' => { 'gust' => 'N/A', 'd' => 'N/A', 's' => 'N/A', 't' => 'N/A' }, 'icon' => '44', 'p' => 'd', 'ppcp' => '10', 'bt' => 'N/A', 't' => 'N/A' }, { 'hmid' => '55', 'wind' => { 'gust' => 'N/A', 'd' => '153', 's' => '13', 't' => 'SSE' }, 'icon' => '33', 'p' => 'n', 'ppcp' => '10', 'bt' => 'M Clear', 't' => 'Mostly Clear' } ], 'd' => '0', 'sunr' => '6:08 AM', 'low' => '8', 't' => 'Thursday' }, { 'hi' => '16', 'suns' => '7:43 PM', 'dt' => 'Apr 22', 'part' => [ { 'hmid' => '44', 'wind' => { 'gust' => 'N/A', 'd' => '139', 's' => '18', 't' => 'SE' }, 'icon' => '30', 'p' => 'd', 'ppcp' => '10', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' }, { 'hmid' => '69', 'wind' => { 'gust' => 'N/A', 'd' => '104', 's' => '29', 't' => 'ESE' }, 'icon' => '12', 'p' => 'n', 'ppcp' => '80', 'bt' => 'Rain', 't' => 'Rain' } ], 'd' => '1', 'sunr' => '6:06 AM', 'low' => '11', 't' => 'Friday' }, { 'hi' => '18', 'suns' => '7:44 PM', 'dt' => 'Apr 23', 'part' => [ { 'hmid' => '70', 'wind' => { 'gust' => 'N/A', 'd' => '148', 's' => '27', 't' => 'SSE' }, 'icon' => '12', 'p' => 'd', 'ppcp' => '80', 'bt' => 'Rain', 't' => 'Rain' }, { 'hmid' => '61', 'wind' => { 'gust' => 'N/A', 'd' => '62', 's' => '11', 't' => 'ENE' }, 'icon' => '11', 'p' => 'n', 'ppcp' => '60', 'bt' => 'Light Rain', 't' => 'Light Rain' } ], 'd' => '2', 'sunr' => '6:05 AM', 'low' => '11', 't' => 'Saturday' }, { 'hi' => '13', 'suns' => '7:45 PM', 'dt' => 'Apr 24', 'part' => [ { 'hmid' => '47', 'wind' => { 'gust' => 'N/A', 'd' => '22', 's' => '16', 't' => 'NNE' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '30', 'bt' => 'Few Showers', 't' => 'Few Showers' }, { 'hmid' => '53', 'wind' => { 'gust' => 'N/A', 'd' => '349', 's' => '8', 't' => 'N' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '10', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '3', 'sunr' => '6:03 AM', 'low' => '6', 't' => 'Sunday' }, { 'hi' => '11', 'suns' => '7:46 PM', 'dt' => 'Apr 25', 'part' => [ { 'hmid' => '48', 'wind' => { 'gust' => 'N/A', 'd' => '59', 's' => '11', 't' => 'ENE' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '40', 'bt' => 'Showers', 't' => 'Showers' }, { 'hmid' => '53', 'wind' => { 'gust' => 'N/A', 'd' => '162', 's' => '8', 't' => 'SSE' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '10', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '4', 'sunr' => '6:02 AM', 'low' => '7', 't' => 'Monday' }, { 'hi' => '13', 'suns' => '7:47 PM', 'dt' => 'Apr 26', 'part' => [ { 'hmid' => '50', 'wind' => { 'gust' => 'N/A', 'd' => '197', 's' => '10', 't' => 'SSW' }, 'icon' => '30', 'p' => 'd', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' }, { 'hmid' => '54', 'wind' => { 'gust' => 'N/A', 'd' => '264', 's' => '5', 't' => 'W' }, 'icon' => '33', 'p' => 'n', 'ppcp' => '10', 'bt' => 'M Clear', 't' => 'Mostly Clear' } ], 'd' => '5', 'sunr' => '6:01 AM', 'low' => '9', 't' => 'Tuesday' }, { 'hi' => '17', 'suns' => '7:48 PM', 'dt' => 'Apr 27', 'part' => [ { 'hmid' => '52', 'wind' => { 'gust' => 'N/A', 'd' => '106', 's' => '10', 't' => 'ESE' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '30', 'bt' => 'Few Showers', 't' => 'Few Showers' }, { 'hmid' => '60', 'wind' => { 'gust' => 'N/A', 'd' => '170', 's' => '10', 't' => 'S' }, 'icon' => '12', 'p' => 'n', 'ppcp' => '60', 'bt' => 'Rain', 't' => 'Rain' } ], 'd' => '6', 'sunr' => '5:59 AM', 'low' => '11', 't' => 'Wednesday' }, { 'hi' => '14', 'suns' => '7:49 PM', 'dt' => 'Apr 28', 'part' => [ { 'hmid' => '52', 'wind' => { 'gust' => 'N/A', 'd' => '254', 's' => '11', 't' => 'WSW' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '30', 'bt' => 'Few Showers', 't' => 'Few Showers' }, { 'hmid' => '55', 'wind' => { 'gust' => 'N/A', 'd' => '240', 's' => '10', 't' => 'WSW' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '7', 'sunr' => '5:58 AM', 'low' => '9', 't' => 'Thursday' }, { 'hi' => '16', 'suns' => '7:50 PM', 'dt' => 'Apr 29', 'part' => [ { 'hmid' => '51', 'wind' => { 'gust' => 'N/A', 'd' => '237', 's' => '13', 't' => 'WSW' }, 'icon' => '30', 'p' => 'd', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' }, { 'hmid' => '60', 'wind' => { 'gust' => 'N/A', 'd' => '284', 's' => '8', 't' => 'WNW' }, 'icon' => '11', 'p' => 'n', 'ppcp' => '60', 'bt' => 'Light Rain', 't' => 'Light Rain' } ], 'd' => '8', 'sunr' => '5:57 AM', 'low' => '10', 't' => 'Friday' }, { 'hi' => '17', 'suns' => '7:51 PM', 'dt' => 'Apr 30', 'part' => [ { 'hmid' => '53', 'wind' => { 'gust' => 'N/A', 'd' => '358', 's' => '11', 't' => 'N' }, 'icon' => '11', 'p' => 'd', 'ppcp' => '60', 'bt' => 'Light Rain', 't' => 'Light Rain' }, { 'hmid' => '58', 'wind' => { 'gust' => 'N/A', 'd' => '217', 's' => '10', 't' => 'SW' }, 'icon' => '29', 'p' => 'n', 'ppcp' => '20', 'bt' => 'P Cloudy', 't' => 'Partly Cloudy' } ], 'd' => '9', 'sunr' => '5:56 AM', 'low' => '11', 't' => 'Saturday' } ] }, 'head' => { 'ur' => 'mm', 'ud' => 'km', 'us' => 'km/h', 'form' => 'MEDIUM', 'up' => 'mb', 'locale' => 'en_US', 'ut' => 'C', 'cached' => '1110000000', }, 'cc' => { 'cached' => '1110000000', 'icon' => '34', 'flik' => '10', 'obst' => 'Central Park, NY', 'lsup' => '4/21/05 4:51 PM EDT', 'tmp' => '14', 'hmid' => '62', 'wind' => { 'gust' => '29', 'd' => '160', 's' => '19', 't' => 'SSE' }, 'bar' => { 'r' => '1,014.6', 'd' => 'steady' }, 'moon' => { 'icon' => '12', 't' => 'Waxing Gibbous' }, 'dewp' => '7', 'uv' => { 't' => 'Low', 'i' => '2' }, 'vis' => '16.1', 't' => 'Fair' }, 'lnks' => { 'cached' => '1110000000', 'link' => [ { 'l' => 'http://www.weather.com/outlook/health/allergies/USNY0998?par=xoap', 'pos' => '1', 't' => 'Pollen Reports' }, { 'l' => 'http://www.weather.com/outlook/travel/flights/citywx/USNY0998?par=xoap', 'pos' => '2', 't' => 'Airport Delays' }, { 'l' => 'http://www.weather.com/outlook/events/special/result/USNY0998?when=thisweek&par=xoap', 'pos' => '3', 't' => 'Special Events' }, { 'l' => 'http://www.weather.com/services/desktop.html?par=xoap', 'pos' => '4', 't' => 'Download Desktop Weather' } ], 'type' => 'prmo' }, 'loc' => { 'cached' => '1110000000', 'suns' => '7:42 PM', 'zone' => '-4', 'lat' => '40.79', 'tm' => '5:35 PM', 'sunr' => '6:08 AM', 'dnam' => 'New York/Central Park, NY', 'id' => 'USNY0998', 'lon' => '-73.96' }, 'ver' => '2.0' }; # # Testdata for Weather::Com::Simple::get_weather # $simpleWeather =[{ 'place' => 'New York/Central Park, NY', 'updated' => '4:51 PM EDT on April 21, 2005', 'celsius' => '14', 'temperature_celsius' => '14', 'windchill_celsius' => '10', 'fahrenheit' => '57', 'temperature_fahrenheit' => '57', 'windchill_fahrenheit' => '50', 'wind' => '11 mph 19 km/h from the South Southeast', 'windspeed_kmh' => '19', 'windspeed_mph' => '11', 'humidity' => '62', 'conditions' => 'Fair', 'pressure' => '29.96 in / 1014.6 hPa' }];