The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Ohloh::API::Language - a programming language information on Ohloh

SYNOPSIS

    use WWW::Ohloh::API;

    my $ohloh = WWW::Ohloh::API->new( api_key => $my_api_key );
    my $languages =  $ohloh->get_languages;

    my ( $perl  ) = grep { $_->nice_name eq 'Perl' } $languages->all;

    print $perl->projects, " projects use Perl";

DESCRIPTION

W::O::A::Language contains the information associated with a programming language recognized by Ohloh as defined at http://www.ohloh.net/api/reference/language. To be properly populated, it must be created via the get_languages or get_language method of a WWW::Ohloh::API object.

METHODS

API Data Accessors

id

Return the language's unique id.

name

Return the short name of the language.

nice_name

Return the human-friendly name of the language.

category

Return the type of language, which can be either code or markup.

is_markup

Return true if the language is a markup language, false if it's a code language.

is_code

Return true if the language is a code language, false if it's a markup language.

code

Return the total number of lines of code, excluding comments and blank lines, written in the language across all projects.

comments

Return the total number of comment lines, written in the language across all projects.

blanks

Return the total number of blanks lines, written in the language across all projects.

comment_ratio

Return the ratio of comment lines over the total number of lines for all projects using the language.

projects

Return the number of projects using this language.

contributors

Return the number of contributors who have written at least one line of code using this language.

commits

Return the number of commits which include at least one line in this language.

Other Methods

as_xml

Return the language information as an XML string. Note that this is not the exact xml document as returned by the Ohloh server.

SEE ALSO

VERSION

This document describes WWW::Ohloh::API version 0.0.4

BUGS AND LIMITATIONS

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.

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.

AUTHOR

Yanick Champoux <yanick@cpan.org>

LICENCE AND COPYRIGHT

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.