BuzzSaw

 view release on metacpan or  search on metacpan

lib/BuzzSaw/Report.pm  view on Meta::CPAN

=item %results = $report->process_events(@events)

This method is used to do any post-processing of the events list which
is more easily done in Perl rather than within the database itself. By
default the method does nothing, override this in a sub-class if you
need to do complex classification of events. It must return a hash
which holds the results.

=item $text = $report->process_template( \%results, \@events )

This method uses the Perl Template Toolkit to generate the report
text. It is passed a reference to the hash of results from the
C<process_events> method and a reference to the original list of
events returned by the C<find_events> method.

The references to the results hash and events list are passed into the
template. Further to this a reference is passed in to a C<params> hash
which provides easy access to the values of the C<start>, C<end> and
C<tags> attributes.

The method returns the generated output as a simple text string.

=item send_email

If any email addresses have been specified via the C<email_to>
attribute then this method will be called to deliver the output via
email. The first address in the C<email_to> address will be set as the
C<To> field and any further addresses will be placed in the C<Cc>
field. The message is constructed and sent using the L<MIME::Lite>
module.

=item add_tmpldir

This can be used to add another directory to the list of those which
will be searched for templates when generating the report. Note that
the new directory is put onto the front of the list. This makes it
possible to override any standard template provided in the default
directories.

=back

=head1 DEPENDENCIES

This module is powered by L<Moose> and also uses L<MooseX::Types> and
L<MooseX::Types::EmailAddress>. It uses the Perl Template Toolkit to
generate the reports. It uses L<MIME::Lite> to send reports via email.

=head1 SEE ALSO

L<BuzzSaw>, L<BuzzSaw::Report::Kernel>, L<BuzzSaw::DB>,
L<BuzzSaw::DateTime>, L<BuzzSaw::Types>.

=head1 PLATFORMS

This is the list of platforms on which we have tested this
software. We expect this software to work on any Unix-like platform
which is supported by Perl.

ScientificLinux6

=head1 BUGS AND LIMITATIONS

Please report any bugs or problems (or praise!) to bugs@lcfg.org,
feedback and patches are also always very welcome.

=head1 AUTHOR

    Stephen Quinney <squinney@inf.ed.ac.uk>

=head1 LICENSE AND COPYRIGHT

    Copyright (C) 2012 University of Edinburgh. All rights reserved.

This library is free software; you can redistribute it and/or modify
it under the terms of the GPL, version 2 or later.

=cut




( run in 2.427 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )