NAME
Perlbug::Do - Commands (switches) for generic interface to perlbug database.
DESCRIPTION
Methods for various functions against the perlbug database.
Those that have the form /do(?i:a-z)/ all return something relevant.
To be printed, returned by email, etc.
SYNOPSIS
Use like this:
print $o_obj->dod(2); # "debug level set to '2'"
print $o_obj->dob(\@list_of_bugids); # formatted
print $o_obj->doh(); # help menu...
METHODS
- new
-
Create new Perlbug::Do object:
my $do = Perlbug::Do->new();
- get_switches
-
Returns array of current switches, rather than string
my @switches = $o_pb->get_switches('user');
- doh
-
Returns help message built from a hash_ref, commands may be overwritten by sending in a hash.
Syntax for the hash is 'key => description (sample args)':
print $o_obj->doh({ 'e' => 'email me a copy too (email@address.com)', # add 'H' => 'Help - more detailed info ()', # replace 'z' => '', # unrequired });
- dod
-
Switches debugging on (1).
- doD
-
Dumps database for backup and recovery.
- database_dump_command
-
Returns database dump command (mysql/oracle) for given date (or full) and target file.
else undef
my $cmd = $do->database_dump_command($date, $file);
- dom
-
Return the given message(id), places the "format" in Perlbuged result in to the results array.
my $res = $do->dom([@messageids]);
- doM
-
Create new message
my $new_mid = $do->doM($bugid, 'message', 'etc');
- dog
-
Return the given group(id), places the "format" in Perlbuged result in to the results array.
my @res = $do->dog([@groupids]);
- doG
-
Create new group
my $new_gid = $do->doG($bugid, 'message', 'etc');
- dop
-
Return the given patch(id), places the "format" in Perlbuged result in to the results array.
my @res = $do->dop([@patchids]);
- doP
-
Assign to given bugid, given patch, return i_ok
$res = $o_obj->doP('tid_chid_versid', 'patch...here', 'hdr', 'sbj', 'frm', 'to);
- dot
-
Return the given test(id), places the "format" in Perlbuged result in to the results array.
my @res = $do->dot([@testids]);
- doT
-
Assign to given bugid, given test, return i_ok
$new_tid = $o_obj->doT('tid_chid_versid', 'test...here', 'hdr', 'sbj', 'frm', 'to);
- dob
-
Return the given bug(id), places the "format" in Perlbuged result in to the result array.
my @res = $do->dob([@bugids]);
- doB
-
Return the given bug(id), with all the messages assigned to it, calls dob()
my @res = $do->doB(\@bugids);
- dou
-
Get the given user, checks if active
my @res = $o_do->dou($userid);
- dos
-
Retrieve bugs based on the subject line of a bug
my @res = $do->dos('build failure');
- doS
-
Wrapper for dos() in 'large format'
my @RES = $do->doS('some subject');
- dor
-
Retrieve data based on contents of the Body of a message
my @res = $do->dor('open build');
- doR
-
Wrapper for dor(), in large format
my @res = $do->doR('open');
- don
-
Get the note for this noteid
my @res = $do->don(\@nids);
- doN
-
Creates new note (assigns to given bugid).
my $nid = $self->doN($str, $body, $header, $subject, $from, $to);
- doc
-
Get the patches, or bugs for this changeid
my @res = $do->doc(\@cids);
- doq
-
Gets the sql _q_ query statement given in the body of the message, executes it, and returns the result in the result array.
- doQ
-
Returns the database schema, for use with SQL statements.
my @tables_data = $do->doQ;
- doL
-
Returns the current (or given later) logfile.
my $LOG = $do->doL;
- dol
-
Just the stored log results from this process.
my $process_log = $do->dol;
- dof
-
Sets the appropriate format for use by Formatter methods, overrides default 'a' set earlier.
my @res = $o_obj->dof('h');
- stats
-
Get stats from db for overview usage.
my $h_data = $self->stats;
- doo
-
Returns a summary overview of the bugs, bugs, messages etc. in the database.
my @over = $o_do->doo(); # data in result via formatting...
- doa
-
ONLY do this if registered as admin of bug. in which case dok could still dok(\@bids) these bugids... or should it automatically add id as admin?
my ($res) = $do->doa($command_string, $body);
- doA
-
Wrapper for doa()
- dok
-
Klaim the bug(id) given
my $i_claimed = $do->dok(\@bids);
- doK
-
UnKlaim the bug(id) given
my $i_unclaimed = $do->doK(\@bids);
- dox
-
Delete bug from db_bug table.
Use
doX
for messages associated with bugs.my ($feedback) = $do->dox(\@bids);
- doX
-
Delete given bugs along with messages from db_message.
Also does parent/child, bug_user, etc. tables, also calls dox()
my ($feedback) = $do->doX(\@bids);
- doi
-
Initiate new admin entry, including htpasswd entry, (currently rf only)
userid=test_user: password=p*ss33*t: address=perlbugtest@rfi.net: match_address=.*\@rfi\.net: name=Richard Foley:
or
userid=test_user:password=p*ss33*t:address=perlbugtest@rfi.net:match_address=.*\@rfi\.net:name=Richard Foley my $i_ok = $do->doi($data);
- doI
-
Disable a user entry
my $i_disabled = $do->doI(\@uids);
- doz
-
Configuration data
$data = $o_obj->doz('current');
- doy
-
Password renewal
my ($i_ok) = $do->doy($user, $pass);
- overview
-
Formatting for overview.
$fmt{'bugs'} = $data{'bugs'};
- FORMAT_O_l
-
Formating for lean overview (currently wrapper for FORMAT_a
my ($top, $format, @args) = $o_fmt->FORMAT_l(\%overview);
- FORMAT_O_L
-
Formating for Lean Html overview (currently wrapper for FORMAT_h
my ($top, $format, @args) = $o_fmt->FORMAT_L(\%overview);
- FORMAT_O_a
-
Formating for overview (default).
my ($top, $format, @args) = $o_fmt->FORMAT_a(\%overview);
- FORMAT_O_A
-
Formatting for ASCII overview.
my ($top, $format, @args) = $o_fmt->FORMAT_O_A(\%overview);
- FORMAT_O_h
-
Formatting for html overview.
my ($top, $format, @args) = $o_fmt->FORMAT_O_h(\%overview);
- FORMAT_O_H
-
Formatting for HTML overview.
my ($top, $format, @args) = $o_fmt->FORMAT_O_H(\%overview);
AUTHOR
Richard Foley perlbug@rfi.net Oct 1999 2000 2001