Ricardo SIGNES > Metabase-Client-Simple-0.001 > Metabase::Client::Simple

Download:
Metabase-Client-Simple-0.001.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  5
View/Report Bugs
Module Version: 0.001   Source   Latest Release: Metabase-Client-Simple-0.009

NAME ^

Metabase::Client::Simple - a client that submits to Metabase servers

SYNOPSIS ^

  use Metabase::Client::Simple;
  use Metabase::User::Profile;

  my $profile = Metabase::User::Profile->load('user-profile-file');

  my $client = Metabase::Client::Simple->new({
    profile => $profile,
    url     => 'http://metabase.example.com/',
  });

  my $fact = generate_metabase_fact;

  $client->submit_fact($fact);

DESCRIPTION ^

Metabase::Client::Simple provides is extremely simple, lightweight library for submitting facts to a Metabase web server.

METHODS ^

new

  my $client = Metabase::Client::Simple->new(\%arg)

This is the object constructor.

Valid arguments are:

  profile - a Metabase::User::Profile object
  url     - the root URL for the metabase server

submit_fact

  $client->submit_fact($fact);

This method will submit a Metabase::Fact object to the client's server. On success, it will return a true value. On failure, it will raise an exception.

LICENSE ^

Copyright (C) 2008, Ricardo SIGNES.

This is free software, available under the same terms as perl itself.

syntax highlighting: