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

Note that all do...() methods expect to recieve one of the following arguments:

Either a string, an arrayref, or a hashref (helpful - huh?)

my $h_cmds = $o_do->parse_input($line); # parse string

print $o_do->process_commands($h_cmds); # calls do($cmd, $args) foreach 

METHODS

new

Create new Perlbug::Do object:

my $o_do = Perlbug::Do->new();
parse_input

Parses the given line into a reference to a command hash, this is also where the input should be massaged into the correct format for each method call.

Wraps input2args(), override on a per interface basis, where appropriate.

Input line is expected to look like: -h -b (bugid)+ -r (keywords)+ ...

my $h_cmds = $o_do->parse_input($line); 
parse_line

parse_input without the input2args

my $h_cmds = $o_do->parse_input($line); 
return_type

Return appropriate type of argument wanted given command

my $wanted = $self->return_type($cmd);

eg:
	b -> ARRAY 
	P -> HASH
	s -> SCALAR 
input2args

Handles email input, calls SUPER::input2args()

my $cmd_args = $o_do->input2args($cmd, $args);
process_commands

Interface to all do() methods, calls SUPER::process_commands().

my @res = $o_do->process_commands(\%args);

Where %args looks something like this:

my %args = (	
	'a'	=> \@categories_status_etc,
	'B' => \%new_data,	
	'b' => \@bug_ids,
	'h' => \%extra_info,
	'l'	=> $date || '',
	'q' => $sql_query,
	'z' => $config_type,
	'Z' => [($type, $string)],
); 
do

Wrap a Perlbug::dox command where 'x' may be any alphabetic character.

Each do() command returns the product of it's call for output.

print "Bugs(@bugids): ".join('', $pb->do('b', \@bugids));

print "New bug: ".join('', $pb->do('B', '', $newbug));

print "New msg: ".join('', $pb->do('M', $bugidstring, $message)); # Base 

print "New msg: ".join('', $pb->do('M', $bugidstring, \%mail));   # Email
doa

ONLY do this if registered as admin

my @res = $o_do->doa($command_string);
doA

Wrapper for doa(), calls dob() also.

my @res = $o_do->doa($command_string);
dob

Return the formatted bug by id/s

my @res = $o_do->dob(@bugids);
doB

Create new bug, returning id.

my $bugid = $o_do->doB(\%bug);
doc

Get the patches, or bugs for this changeid

my @res = $o_do->doc(\@cids);	
doC

Create a new changeid

my $cid = $o_do->doC($h_args);
dod

Switches debugging on (1).

my $level_set = $o_do->dod($level);
doD

Dumps database for backup and recovery.

my $feedback = $o_do->doD($date);
database_dump_command

Returns database dump command (mysql/oracle) for given date (or full) and target file.

else undef

my $cmd = $o_do->database_dump_command($date, $file);
doe

Add email address to any cc's 'Cc:' to "-e me.too@some.where.org"

my $i_set = $o_do->doe($cc_addrs);
doE

Send an email notify() about th(is|ese) bugid/s, as if the email was newly recieved.

my $i_ok = $o_obj->doE(\@bugids); 
dof

Sets the appropriate format for use by Formatter methods, overrides default 'a' set earlier.

my $feedback = $o_obj->dof('h'); 
dog

Return the formatted group by id/s

my @res = $o_do->dog(\@groupids);
doG

Create new group

my $new_gid = $o_do->doG($h_args);
doh

Returns help message built from a hash_ref

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' => '', 						
}); 
doi

Retrieve by index (group, status, etc.)

my @res = $o_do->doi($str); 
doI

Wrapper for doi(), in large format

my @res = $o_do->doI('open');
doj

Just test for a response - produces "$title $version => ok"

my @res = $o_do->doj(@args); 
dok

Klaim the bug(id) given

my $feedback = $o_do->dok(\@bids);
doK

UnKlaim the bug(id) given

my $feedback = $o_do->doK(\@bids);
dol

Just the stored log results from this process.

my $process_log = $o_do->dol($max_lines_from_end);
doL

Returns the current (or given later) logfile.

my $LOG = $o_do->doL($date);
dom

Return the formatted message by id/s

my @data = $o_do->dom(\@messageids);
doM

Create new message

my $new_mid = $o_do->doM($h_args);
don

Return the formatted user by id/s

my @res = $o_do->don(\@nids);
doN

Creates new note (assigns to given bugid).

my $nid = $self->doN($h_args);
doo

Returns a summary overview of the bugs, bugs, messages etc. in the database.

my @over = $o_do->doo();
stats

Get stats from db for overview usage.

my $h_data = $self->stats;
dop

Return the formatted patch by id/s

my @res = $o_do->dop(\@patchids);
doP

Assign to given bugid, given patch, return new patch_id

$pid = $o_obj->doP($h_args);
doq

Gets the sql _q_ query statement given in the body of the message, executes it, and returns the result in the result array.

my @results = $o_do->doq($sql);
doQ

Returns the database schema, for use with SQL statements.

my @tables_data = $o_do->doQ;
dor

Retrieve data based on contents of the body of a bug

my @res = $o_do->dor('object initialisation problem');
doR

Wrapper for dor(), in large format

my @res = $o_do->doR('object initialisation problem');
dos

Retrieve bugs based on the subject line of a bug

my @res = $o_do->dos('build failure');
doS

Wrapper for dos() in 'large format'

my @RES = $o_do->doS('some subject');	
	and R

    foreach my $bid (@args) {
		push(@res, $o_bug->read($bid)->format());
		
		my @mids = $o_bug->rel_ids('message');
		my ($mid) = sort { $a <=> $b } @mids;
        push(@res, $self->dom(\@mids));
		
        my @pids = $o_bug->rel_ids('patch');
        push(@res, $self->dop(\@pids));
		
        my @tids = $o_bug->rel_ids('test');
        push(@res, $self->dot(\@tids));
		
        my @nids = $o_bug->rel_ids('note');
        push(@res, $self->don(\@nids));
    }
dot

Return the formatted test by id/s

my @res = $o_do->dot(\@testids);
doT

Assign to given bugid, given test, return i_ok

$new_tid = $o_obj->doT($h_args);
dou

Return the formatted user by id/s

my @res = $o_do->dou(\@userids);
doU

Create new user entry

my $uid = $self->doU($h_args);

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:
dov

Volunteer proposed bug modifications where msg is something like: 'propose_close_<bugid>@bugs.perl.org'

my $i_ok = $o_obj->dov($h_args);
doV

Volunteer a new administrator

my $feedback = $o_do->doV($h_args);
dox

Delete bug from db_bug table.

Use doX for messages associated with bugs.

my @feedback = $o_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 = $o_do->doX(\@bids);
doy

Password renewal

my $i_ok = $o_do->doy("$user $pass");
doz

Retrieve configuration data

$data = $o_obj->doz([qw(current email target)]);
doZ

Attempt to set current configuration data, for this session only

my $debuglevel = $o_obj->doZ('debug', 2);

my $switches   = $o_obj->doZ('switches', 'abcdef');
overview

Formatting for overview.

my $overview = $o_do->overview($h_overview, [$fmt]);
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

1 POD Error

The following errors were encountered while parsing the POD:

Around line 1594:

Unknown directive: =rjsf