~ubuntu-branches/ubuntu/quantal/libyaml-libyaml-perl/quantal-updates

« back to all changes in this revision

Viewing changes to inc/Module/Install/AckXXX.pm

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2011-10-01 17:23:11 UTC
  • mto: (5.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20111001172311-04rcmxnonwgtdx9u
Tags: upstream-0.37
ImportĀ upstreamĀ versionĀ 0.37

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#line 1
2
 
package Module::Install::AckXXX;
3
 
use strict;
4
 
use warnings;
5
 
use 5.008003;
6
 
 
7
 
use Module::Install::Base;
8
 
 
9
 
use vars qw($VERSION @ISA);
10
 
BEGIN {
11
 
    $VERSION = '0.11';
12
 
    @ISA     = 'Module::Install::Base';
13
 
}
14
 
 
15
 
sub ack_xxx {
16
 
    my $self = shift;
17
 
    return unless $self->is_admin;
18
 
 
19
 
    require Capture::Tiny;
20
 
    sub ack { system "ack '^\\s*use XXX\\b'"; }
21
 
    my $output = Capture::Tiny::capture_merged(\&ack);
22
 
    $self->_report($output) if $output;
23
 
}
24
 
 
25
 
sub _report {
26
 
    my $self = shift;
27
 
    my $output = shift;
28
 
    chomp ($output);
29
 
    print <<"...";
30
 
 
31
 
*** AUTHOR WARNING ***
32
 
*** Found usage of XXX.pm in this code:
33
 
$output
34
 
 
35
 
...
36
 
}
37
 
 
38
 
1;
39
 
 
40
 
=encoding utf8
41
 
 
42
 
#line 82