Bot-BasicBot-Pluggable-Module-Weather

 view release on metacpan or  search on metacpan

lib/Bot/BasicBot/Pluggable/Module/Aviation.pm  view on Meta::CPAN

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
sub help {
    return "My aviation-related functions are metar, taf, great-circle, tsd, zulutime, and airport. For help with any, ask me about '<function name> help";
}
 
sub _fix_icao {
    my $site = uc(shift);
 
    # ICAO airport codes *can* contain numbers, despite earlier claims.
    # Americans tend to use old FAA three-letter codes; luckily we can
    # *usually* guess what they mean by prepending a 'K'. The original
    # author, being Canadian apparently, displays similarl impeccable
    # laziness.   
 
    $site =~ s/[.?!]$//;
    $site =~ s/\s+$//g;
    return undef
            unless $site =~ /^[\w\d]{3,4}$/;
    $site  = "C" . $site if length($site) == 3 && $site =~ /^Y/;
    $site  = "K" . $site if length($site) == 3;



( run in 1.106 second using v1.01-cache-2.11-cpan-95122f20152 )