WWW::Myki - A simple Perl interface to Myki online account management portal
use WWW::Myki; my $myki = WWW::Myki->new( username => 'myusername', password => 'mypassw0rd' ); # Print card number, card holder, Myki money and Myki pass balances foreach $card ( $myki->cards ) { print "Card number: ". $card->id ." - Holder: ". $card->holder "\n"; print "Myki money balance : ". $card->money ." - Myki pass balance: ". $card->pass ."\n"; } # Print the date, time, service, description and cost of our last 15 transactions foreach my $trip ( $card->transactions ) { printf( "%10s %8s %-10s %-20s %-5s\n", $trip->date, $trip->time, $trip->service, $trip->desc, $trip->debit ) }
WWW::Myki provides a simple interface to the Myki online account management portal functionality for registered Myki users.
Constructor. Creates a new WWW::Myki object and attempts a login using the provided credentials. On successful login, returns a WWW::Myki object.
The constructor accepts an anonymous hash of two mandatory parameters:
username
Your registered Myki account username.
password
Your registered Myki account password.
my @cards = $myki->cards;
Returns an array of WWW::Myki::Card objects. Each object is representative of a Myki card registered to the specified account.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Please report any bugs or feature requests to bug-www-myki at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Myki. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-www-myki at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc WWW::Myki
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Myki
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-Myki
CPAN Ratings
http://cpanratings.perl.org/d/WWW-Myki
Search CPAN
http://search.cpan.org/dist/WWW-Myki/
Copyright 2012 Luke Poskitt.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
WWW::Myki::Card, WWW::Myki::Transaction
To install WWW::Myki, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Myki
CPAN shell
perl -MCPAN -e shell install WWW::Myki
For more information on module installation, please visit the detailed CPAN module installation guide.