Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    WWW::NationalRail 0.1

    Download button

    No screenshots available
    Downloads: 245  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Edward Betts | More programs
    Perl Artistic License / FREE
    September 23rd, 2009, 13:37 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    WWW::NationalRail description

    Perl interface to the UK rail timetable

    WWW::NationalRail is a Perl interface to the UK national rail timetable.

    SYNOPSIS

     use WWW::NationalRail;

     my $rail = WWW::NationalRail->new({
     from => "London",
     to => "Cambridge",
     out_date => "18/12/05",
     out_type => "depart",
     out_hour => 9,
     out_minute => 0,
     ret_date => "18/12/05",
     ret_type => "depart",
     ret_hour => 17,
     ret_minute => 0,
     });

     $rail->search or die $rail->error();

     my $os = $rail->outward_summary; # array reference
     my $rs = $rail->return_summary;

     $os->[0]{depart} # "09:06"
     $os->[0]{arrive} # "10:25"
     $os->[0]{changes} # "0"
     $os->[0]{duration} # "1:19"

     my $od = $rail->outward_detail;
     my $rd = $rail->return_detail;

     $od->[0]->{duration}; # "1:19"

     my $legs = $od->[0]{legs} # array reference

     $legs->[0]{station} # "LONDON KINGS CROSS"
     $legs->[0]{arrive} # undef
     $legs->[0]{depart} # "09:06"
     $legs->[0]{travelby} # "Train"
     $legs->[0]{operator} # "WAGN RAIL"

     $rail->ret_hour(19); # change search parameters
     $rail->search(); # and search again



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    UK rail timetable | Perl interface | Perl module | Perl | UK | rail

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM