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


Net-Parliament documentation  | view source Contained in the Net-Parliament distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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(
        parliament => 40,
        session    => 2,
    );
    my $members = $parl->members();

METHODS

Top

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.

bills()

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

bill_votes( $bill_name )

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

member_votes( $member_id )

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

AUTHOR

Top

Luke Closs, <cpan at 5thplane.com>

BUGS

Top

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

Top

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

    perldoc Net::Parliament

You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Parliament

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Net-Parliament

* CPAN Ratings

http://cpanratings.perl.org/d/Net-Parliament

* Search CPAN

http://search.cpan.org/dist/Net-Parliament/

ACKNOWLEDGEMENTS

Top

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

COPYRIGHT & LICENSE

Top


Net-Parliament documentation  | view source Contained in the Net-Parliament distribution.