Web::MREST::CLI(3) CLI components for Web::MEST-based applications

VERSION

Version 0.280

DESCRIPTION

Top-level module of the Web::MREST::CLI distribution. Exports some ``generalized'' functions that are used internally and might also be useful for writing CLI clients in general.

EXPORTS

PACKAGE VARIABLES

FUNCTIONS

init_cli_client

Takes PARAMHASH containing possible parameters "distro", "sitedir", and "debug_mode". Initializes CLI client and returns a status object.

The "distro" string should use hyphens instead of double-colons, i.e. "Foo-Bar" instead of "Foo::Bar".

normalize_filespec

Given a filename (path) which might be relative or absolute, return an absolute version. If the path was relative, it will be anchored to the home directory of the user we are running as.

init_ua

Initialize the LWP::UserAgent singleton object.

cookie_jar

Return the cookie_jar associated with our user agent.

send_req

Send a request to the server, get the response, convert it from JSON, and return it to caller. Die on unexpected errors.