WWW::Ohloh::API::SizeFact - statistics about a Project source code
use WWW::Ohloh::API; my $ohloh = WWW::Ohloh::API->new( api_key => $my_api_key ); my @size_facts = $ohloh->get_size_facts( $project_id ); my $size_fact = shift @size_facts; print $size_fact->month;
W::O::A::SizeFact contains the statistics associated with an Ohloh project. To be properly populated, it must be created via the get_size_facts method of a WWW::Ohloh::API object.
get_size_facts
Indicate the month covered by this SizeFact.
The total net lines of code, excluding comments and blanks, as of the end of this month.
The total net lines of comments as of the end of this month.
The total net blank lines as of the end of this month.
The fraction of net lines which are comments as of the end of this month.
The cumulative total months of effort expended by all contributors on this project, including this month.
( $month, $commits, $code, $blanks, $comments, $comment_ratio, $man_month ) = $size_fact->stats;
Return the facts as an array.
Return the size fact as an XML string. Note that this is not the exact xml document as returned by the Ohloh server.
@stats = @$size_fact; # equivalent to # @stats = $size_fact->stats
Using the object as an array reference can be used as a shortcut for the method stats.
WWW::Ohloh::API.
Ohloh API reference: http://www.ohloh.net/api/getting_started
Ohloh size_fact API reference: http://www.ohloh.net/api/reference/size_fact
This document describes WWW::Ohloh::API version 0.2.0
WWW::Ohloh::API is very extremely alpha quality. It'll improve, but till then: Caveat emptor.
The as_xml() method returns a re-encoding of the account data, which can differ of the original xml document sent by the Ohloh server.
as_xml()
Please report any bugs or feature requests to bug-www-ohloh-api@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-www-ohloh-api@rt.cpan.org
Yanick Champoux <yanick@cpan.org>
<yanick@cpan.org>
Copyright (c) 2008, Yanick Champoux <yanick@cpan.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install WWW::Ohloh::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Ohloh::API
CPAN shell
perl -MCPAN -e shell install WWW::Ohloh::API
For more information on module installation, please visit the detailed CPAN module installation guide.