Go to the source code of this file.
Functions | |
| use lib | dirname ($0) |
| our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d) | |
| getopts ('Tvtlu:d:') | |
| if (defined $opt_v) | |
| if (!(defined $opt_u &&defined $locid &&!$locid eq"")) | |
| if (!$xml) | |
| printf updatetime::Updated | localtime ()."\n" |
| foreach | $item (@{$xml->{channel}->{item}}) |
Variables | |
| use | strict |
| use | BBCLocation |
| my | $name = 'BBC-3day-XML' |
| my | $version = 0.1 |
| my | $author = 'Stuart Morgan' |
| my | $email = 'stuart@tase.co.uk' |
| my | $updateTimeout = 360*60 |
| my | $retrieveTimeout = 30 |
| my | types |
| my | $dir = "./" |
| my | $locid = shift |
| my | $units = $opt_u |
| my | $base_url |
| my | $local_base_url |
| die unless defined | $response |
| my | $xml = XMLin($response) |
| printf copyright::From bbc co uk | n |
| my | $location = $xml->{channel}->{title} |
| my | $i = 0 |
| my | $item |
| use lib dirname | ( | $ | 0 | ) |
| our | ( | $ | opt_v, | |
| $ | opt_t, | |||
| $ | opt_T, | |||
| $ | opt_l, | |||
| $ | opt_u, | |||
| $ | opt_d | |||
| ) |
| getopts | ( | 'Tvtlu:d:' | ) |
| if | ( | defined $ | opt_v | ) |
Definition at line 34 of file bbcthreedayxml.pl.
| if | ( | ! | defined $opt_u &&defined $locid &&!$locid eq"" | ) |
Definition at line 69 of file bbcthreedayxml.pl.
| if | ( | !$ | xml | ) |
Definition at line 96 of file bbcthreedayxml.pl.
| printf updatetime::Updated localtime | ( | ) |
Referenced by GreedyHDeint(), hdhomerun_debug_vprintf(), if(), and main().
| foreach $item | ( | ) |
Definition at line 110 of file bbcthreedayxml.pl.
| use strict |
Definition at line 7 of file bbcthreedayxml.pl.
| use BBCLocation |
Definition at line 16 of file bbcthreedayxml.pl.
| my $name = 'BBC-3day-XML' |
Definition at line 20 of file bbcthreedayxml.pl.
| my $version = 0.1 |
Definition at line 21 of file bbcthreedayxml.pl.
| my $author = 'Stuart Morgan' |
Definition at line 22 of file bbcthreedayxml.pl.
| my $email = 'stuart@tase.co.uk' |
Definition at line 23 of file bbcthreedayxml.pl.
| my $updateTimeout = 360*60 |
Definition at line 24 of file bbcthreedayxml.pl.
| my $retrieveTimeout = 30 |
Definition at line 25 of file bbcthreedayxml.pl.
| my types |
Initial value:
('3dlocation', 'station_id', 'copyright', 'weather_icon', 'date-0', 'icon-0', 'low-0', 'high-0', 'date-1', 'icon-1', 'low-1', 'high-1', 'date-2', 'icon-2', 'low-2', 'high-2', 'updatetime')
Definition at line 26 of file bbcthreedayxml.pl.
| my $dir = "./" |
Definition at line 30 of file bbcthreedayxml.pl.
| my $locid = shift |
Definition at line 68 of file bbcthreedayxml.pl.
| my $units = $opt_u |
Definition at line 73 of file bbcthreedayxml.pl.
| my $base_url |
Definition at line 74 of file bbcthreedayxml.pl.
| my $local_base_url |
Initial value:
'http: my $world_base_url = 'http: if ($locid =~ s/^W(.*)/$1/) { $base_url = $world_base_url; } elsif ($locid =~ s/^L(.*)/$1/) { $base_url = $local_base_url; } else { die "Invalid Location ID"; } my $response = get $base_url . $locid . '.xml'
Definition at line 75 of file bbcthreedayxml.pl.
| die unless defined $response |
Definition at line 92 of file bbcthreedayxml.pl.
| my $xml = XMLin($response) |
Definition at line 94 of file bbcthreedayxml.pl.
| printf:: $location n |
Definition at line 100 of file bbcthreedayxml.pl.
| $location = $xml->{channel}->{title} |
Definition at line 102 of file bbcthreedayxml.pl.
| my $i = 0 |
Definition at line 107 of file bbcthreedayxml.pl.
| my $item |
1.5.5