NAME

Net::Parliament - Scrape data from parl.gc.ca

VERSION

Version 0.01

SYNOPSIS

This module will fetch HTML and XML from parl.gc.ca, and then parse it into hashrefs.

use Net::Parliament;

my $parl = Net::Parliament->new;
my $members = $parl->Get_members();

METHODS

Get_members(%opts)

This method returns an arrayref containing a hashref for each member of parliament. Fetching the data is cached via Net::Parliament::UserAgent.

Options:

extended

If set to true, extra data from the member's home page will be fetched. This takes much longer.

limit

Only return this number of results. Useful for testing.

Get_bills()

This method returns an arrayref containing a hashref for each Government Bill raised in parliament.

Options:

parl

Which Parliament. Should be 35 to 40-ish.

session

Which session of Parliament. Should be 1, 2 or sometimes 3.

Get_bill_votes()

This method returns an arrayref containing a hashref for each vote on the specified Bill.

Options:

parl

Which Parliament. Should be 35 to 40-ish.

session

Which session of Parliament. Should be 1, 2 or sometimes 3.

bill

Which bill to fetch votes for. Should be like 'C-2' or 'C2'.

Get_member_votes()

This method returns an arrayref containing a hashref for each vote made by the specified member.

Options:

parl

Which Parliament. Should be 35 to 40-ish.

session

Which session of Parliament. Should be 1, 2 or sometimes 3.

member

Which member to fetch votes for. Should be a number like 105824.

AUTHOR

Luke Closs, <cpan at 5thplane.com>

BUGS

Please report any bugs or feature requests to bug-net-parliament at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Parliament. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::Parliament

You can also look for information at:

ACKNOWLEDGEMENTS

Thanks to parl.gc.ca for the parts of their site in XML format.

COPYRIGHT & LICENSE

Copyright 2009 Luke Closs, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.