CASCM-Wrapper
view release on metacpan or search on metacpan
lib/CASCM/Wrapper.pm view on Meta::CPAN
in the context will be ignored. Your scripts will need to load the
appropriate L<Log::Any::Adapter> to capture the log statements. The
CA-SCM log is parsed and the messages are logged either as I<INFO>,
I<WARN> or I<ERROR>.
# Using Log4perl
use CASCM::Wrapper;
use Log::Log4perl;
use Log::Any::Adapter;
Log::Log4perl->init('log4perl.conf');
Log::Any::Adapter->set('Log4perl');
# Get logger
my $log = Log::Log4perl->get_logger();
# Set parse_logs to true. This will croak if Log:Any is not found.
my $cascm = CASCM::Wrapper->new( { parse_logs => 1 } );
# You can also set the logging category
# This is currently available with Log4perl only
$cascm->parse_logs('mylogger');
# Set Context
my $context = { ... };
$cascm->set_context($context);
# Calling the method automatically will parse the log output into the Log4perl object
# The output is also logged in the 'CASCM::Wrapper' category.
$cascm->hco(@files) or die $cascm->errstr;
=head1 ERROR HANDLING
All methods return true on success and C<undef> on failure. The error
that most likely caused the I<last> failure can be obtained by calling
the C<errstr> method. The exit value of the last I<h> command can be
obtained by calling the C<exitval> method.
=head1 DEPENDENCIES
CA-SCM r12 (or higher) client. Harvest 7.1 might work, but has not been
tested.
The CA-SCM methods depends on the corresponding commands to be
available in the I<PATH>
At least Perl 5.6.1 is required to run.
Optionally, L<Config::Tiny> is required to read context files
Optionally, L<Log::Any> and L<Log::Any::Adapter> is required to parse
CA-SCM log files
=head1 SEE ALSO
L<CA Software Change
Manager|http://www.ca.com/us/products/detail/CA-Software-Change-Manager.aspx>
=head1 BUGS AND LIMITATIONS
Please report any bugs or feature requests at
L<https://github.com/mithun/perl-cascm-wrapper/issues>
=head1 AUTHOR
Mithun Ayachit C<mithun@cpan.org>
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2014, Mithun Ayachit. All rights reserved.
This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself. See L<perlartistic>.
=cut
( run in 1.631 second using v1.01-cache-2.11-cpan-39bf76dae61 )