View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ricardo Vazquez Armenta > Data-Reporter-1.4 > Data::Reporter::VisSection



Annotate this POD


New  1
Open  0
View/Report Bugs


VisSection - handler to manipulate sections in


        use Data::Reporter::VisSection;

        $section = new Data::Reporter::VisSection();
        $section->configure(Name => 'mydetail',
                        Lines => ('line 1', 'line 2', 'line 3'),
                        Code => "print 'this is the detail section\n';",
                        Size => 3,
                        Break_field => 0,
                        Width => 20,
                        Only_code => 0);
        my $name = $section->name();
        my $size = $section->size();
        my $break_field = $section->break_field();
        my @lines = $section->lines();
        my $code = $section->code();
        my $only_code = $section->only_code();
        $section->append("print 'this is the last line of code\n');
        $section->insert("print 'this is the first line of code\n'");

        open OUT, "out.txt";



Creates a new section handler

$section->configure(option => value)

valid options are:

Name Section name

Lines array of Lines to be printed in this section

Code Code to execute before printing the data section

Size Number of lines in the section

Break_field Field number in which the break applies

Width Numbers of columns in section

Only_code Indicator for a no-lines section


Returns the section's name


Returns the section's size


Returns the section's break_field


Returns an array with the section`s lines


Returns the section's Code


Returns the only_code indicator


Print perl code in OUT handler. This code is the section's information


A section is a part of a report. For example the header section, the title section, etc. Each section has two parts:

Code part

This contains perl code, which is executed before printing the data lines of the section. This is useful because you can prepare the data to print in the report or acumulate totals. The special variable @field, is used to print data in lines.

Lines part

Here are the lines to print. The lines are printed using the RepFormat module, there are special fields in printing the lines:


This field generates code to print $field[n]


This field generates code to print $report->page(n). page is a special feature from Reporter module


This field generates code to print $report->time(n). time is a special feature from Reporter module


This field generates code to print $report->date(n). date is a special feature from Reporter module

syntax highlighting: