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

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.