# Convert.pm: Generic Conversions for LOG Reports
package Convert::DB::LOG::Convert;
# $Id: Convert.pm,v 1.6 2014/08/19 16:13:58 RDA Exp $
# ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/Convert/DB/LOG/Convert.pm,v 1.6 2014/08/19 16:13:58 RDA Exp $
#
# Change History
# 20140819 MSC Improve the documentation.
=head1 NAME
Convert::DB::LOG::Convert - Generic Conversions for DB.LOG Reports
=head1 SYNOPSIS
require Convert::DB::LOG::Convert;
=head1 DESCRIPTION
This package regroups generic conversion methods for the DB.LOG module reports.
It is only provided as plugin example and is thus incomplete by nature.
=cut
use strict;
BEGIN
{ use Exporter;
use RDA::Text qw(get_string);
use RDA::Driver::Convert;
}
# Define the global public variables
use vars qw($VERSION @ISA %PLUGIN);
$VERSION = sprintf('%d.%02d', q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
%PLUGIN = (
cnv => [{blk => {
alert_sum => [
[qr{^Counts by Error$}, ## no critic (Fix)
{q{-} => \&split_error_row}]
],
},
nam => 'Table Improvements',
rnk => 10,
sel => \&RDA::Driver::Convert::sel_block,
typ => 'T',
},
],
);
# Define the global private constants
# Define the global private variables
# Report the package version
sub Version
{ return $VERSION;
}
# Split error count rows
sub split_error_row
{ my ($ctl, $lin) = @_;
my ($buf, $cnt, $err, @tbl);
$buf = q{};
@tbl = $ctl->get_cells($lin);
while (($err, $cnt) = splice(@tbl, 0, 2))
{ $buf .= qq{\n}
if $err && $err !~ m/^\*.+\*$/;
}
return $buf;
}
1;
__END__
=head1 SEE ALSO
L,
L,
L,
L
=head1 COPYRIGHT NOTICE
Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
=head1 TRADEMARK NOTICE
Oracle and Java are registered trademarks of Oracle and/or its
affiliates. Other names may be trademarks of their respective owners.
=cut