| 1 | package Data::Collector::Engine::Local; | ||
| 2 | { | ||
| 3 | 1 | $Data::Collector::Engine::Local::VERSION = '0.15'; | |
| 4 | } | ||
| 5 | # ABSTRACT: An engine for Data::Collector that runs local commands | ||
| 6 | |||
| 7 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use IPC::System::Simple 'capture'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 1 | extends 'Data::Collector::Engine'; | |
| 12 | |||
| 13 | 1 | has '+name' => ( default => 'Local' ); | |
| 14 | |||
| 15 | 0 | ▶ | sub run { |
|
Subroutine
run: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 16 | 0 | my ( $self, $cmd ) = @_; | |
| 17 | |||
| 18 | 0 | return capture($cmd); | |
| 19 | } | ||
| 20 | |||
| 21 | 1 | __PACKAGE__->meta->make_immutable; | |
| 22 | 1 | 1; | |
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | =pod | ||
| 27 | |||
| 28 | =head1 NAME | ||
| 29 | |||
| 30 | Data::Collector::Engine::Local - An engine for Data::Collector that runs local commands | ||
| 31 | |||
| 32 | =head1 VERSION | ||
| 33 | |||
| 34 | version 0.15 | ||
| 35 | |||
| 36 | =head1 SYNOPSIS | ||
| 37 | |||
| 38 | use Data::Collector; | ||
| 39 | |||
| 40 | my $collector = Data::Collector->new( | ||
| 41 | engine => 'Local', | ||
| 42 | ); | ||
| 43 | |||
| 44 | This engine helps debugging Data::Collector better by running commands locally. | ||
| 45 | |||
| 46 | =head2 run | ||
| 47 | |||
| 48 | This functions runs the given command locally using IPC::System::Simple. | ||
| 49 | |||
| 50 | =head1 AUTHOR | ||
| 51 | |||
| 52 | Sawyer X <xsawyerx@cpan.org> | ||
| 53 | |||
| 54 | =head1 COPYRIGHT AND LICENSE | ||
| 55 | |||
| 56 | This software is copyright (c) 2012 by Sawyer X. | ||
| 57 | |||
| 58 | This is free software; you can redistribute it and/or modify it under | ||
| 59 | the same terms as the Perl 5 programming language system itself. | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | |||
| 64 | __END__ | ||