Net::Gnats::Session
Represents a specific connection to Gnats.
When constructing a new session, it resets $Net::Gnats::current_session.
The name is a combination of database and username, a friendly handle.
It does not mean anything to GNATS.
Retrieves the access for the current database.
Sets and retrieves the current database. If a value is given then a change to the given database is made.
The hostname of the Gnats daemon process.
Default: localhost
The password for the user connecting to the Gnats daemon process.
Most commands require authentication.
The port of the Gnats daemon process.
Default: 1529
Get the schema for this session. Readonly.
Set skip_version to override Gnats version checking. By default, Net::Gnats supports v4 only.
You use this at your own risk.
The user connecting to the Gnats daemon process.
The Gnats daemon process version. The version will only be set after connecting.
Return:
0 if failue 1 if success
Connects to Gnats. If the username and password is set, it will attempt authentication.
Connecting an already connected session infers reconnect.
Disconnects from the current session, either authenticated or not.
Issues a command using a Command object. The Command object is returned to the caller.
The Command object composes a Response, whose value(s) carry error codes and the literal values retrived from Gnats.
Runs a RAW command using this session. Returns RAW output.
To install Net::Gnats, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Gnats
CPAN shell
perl -MCPAN -e shell install Net::Gnats
For more information on module installation, please visit the detailed CPAN module installation guide.