Jose Marti Weeks > E2-Interface-0.34 > E2::ClientVersion

Download:
E2-Interface-0.34.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.31   Source  

NAME ^

E2::ClientVersion - Load client version information from everything2.com

SYNOPSIS ^

        use E2::ClientVersion;

        my $client = new E2::ClientVersion;

        $client->update;

        my $c = $client->clients;


        # Print the current and available version of e2interface

        my $ver   = $client->version;        # See E2::Interface;
        my $name  = $client->client_name;    # See E2::interface;

        print "We are using $name/$ver.";
        print "\nThe newest available version of $name is ";
        print $c->{$name}->{version};


        # List all registered e2 clients and their version numbers

        print "\n\nRegistered e2 clients:\n";
        foreach( keys %$c ) {
                print "$_: " . $c->{$_}->{version} . "\n";
        }

DESCRIPTION ^

This module allows a user to load his session information This module provides an interface to everything2.com's search interface. It inherits E2::Ticker.

CONSTRUCTOR ^

new

new creates an E2::Session object.

METHODS ^

$client->update

This method fetches the list of registered clients from e2.

$client->clients

This metod returns a hashref to the information about registered clients on e2. The keys to this hashref are the names of the available clients, and the values are hashrefs to information about the clients with the following keys:

        name            # The client's name
        id              # The node_id of the client's superdoc
        version         # The most recent version of the client
        homepage        # The homepage of the client (URL)
        download        # The download page of the client (URL)
        maintainer      # The username of the client's maintainer
        maintainer_id   # The node_id of the client's maintainer

Example code:

        my $c = $client->clients;

        print $c->{e2client}->{version} # Prints the version number of 'e2client'

SEE ALSO ^

E2::Interface, E2::Ticker, http://everything2.com/?node=clientdev, http://everything2.com/?node=e2interface

AUTHOR ^

Jose M. Weeks <jose@joseweeks.com> (Simpleton on E2)

COPYRIGHT ^

This software is public domain.

syntax highlighting: