NAME
Weather::TW - Fetch Taiwan weather data from ä¸å¤®æ°£è±¡å±€
SYNOPSIS
use Weather::TW;
my $weather = new Weather::TW;
my $xml = $weather->area('Taipei')->xml;
# currently only xml is supported
foreach my $area ($weather->area_en){
my $xml = $weather->area($area)->xml
print $xml;
}
use utf8;
$xml = $weather->area('�北市')->xml;
# Chinese also works!
DESCRIPTION
This module parse data from http://www.cwb.gov.tw/ (ä¸å¤®æ°£è±¡å±€), and generates xml data. In future it may support json and other formats as well.
METHODS
<new
> Create a newWeather::TW
object.<area('$area_name')
> City name can be either Chinese or English. The returned value is$self
so you can use it for cascading. $xmlstr = $weather->area('Taipei City')->to_XML; The available area names are: å�°åŒ—市 Taipei City 新北市 New Taipei City å�°ä¸å¸‚ Taichung City å�°å�—市 Tainan City 高雄市 Kaohsiung City 基隆北海岸 Keelung North Coast 桃園 Taoyuan 新竹 Hsinchu è‹—æ — Miaoli 彰化 Changhua å�—投 Nantou 雲林 Yunlin 嘉義 Chiayi å±�æ�± Pingtung æ�†æ˜¥å�Šå³¶ Hengchun Peninsula å®œè˜ Yilan 花蓮 Hualien å�°æ�± Taitung 澎湖 Penghu 金門 Kinmen 馬祖 Matsu<area_zh
> Return area names in Chinese. @names = $weather->area_zh;<area_en
> Return area names in English. @names = $weather->area_en;<xml
> Return data as xml
SEE ALSO
https://github.com/dryman/Weather-TW XML::Smart
AUTHOR
dryman, <idryman@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2011 by dryman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 70:
Non-ASCII character seen before =encoding in 'ä¸å¤®æ°£è±¡å±€'. Assuming CP1252
- Around line 95:
'=item' outside of any '=over'
- Around line 172:
You forgot a '=back' before '=head1'