~ubuntu-branches/ubuntu/natty/libsignatures-perl/natty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-05-18 20:34:44 UTC
  • Revision ID: james.westby@ubuntu.com-20090518203444-ee3iqibpk6uxo7u8
Tags: upstream-0.05
ImportĀ upstreamĀ versionĀ 0.05

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#line 1
 
2
package Module::Install::WriteAll;
 
3
 
 
4
use strict;
 
5
use Module::Install::Base;
 
6
 
 
7
use vars qw{$VERSION @ISA $ISCORE};
 
8
BEGIN {
 
9
        $VERSION = '0.84';
 
10
        @ISA     = qw{Module::Install::Base};
 
11
        $ISCORE  = 1;
 
12
}
 
13
 
 
14
sub WriteAll {
 
15
        my $self = shift;
 
16
        my %args = (
 
17
                meta        => 1,
 
18
                sign        => 0,
 
19
                inline      => 0,
 
20
                check_nmake => 1,
 
21
                @_,
 
22
        );
 
23
 
 
24
        $self->sign(1)                if $args{sign};
 
25
        $self->admin->WriteAll(%args) if $self->is_admin;
 
26
 
 
27
        $self->check_nmake if $args{check_nmake};
 
28
        unless ( $self->makemaker_args->{PL_FILES} ) {
 
29
                $self->makemaker_args( PL_FILES => {} );
 
30
        }
 
31
 
 
32
        # Until ExtUtils::MakeMaker support MYMETA.yml, make sure
 
33
        # we clean it up properly ourself.
 
34
        $self->realclean_files('MYMETA.yml');
 
35
 
 
36
        if ( $args{inline} ) {
 
37
                $self->Inline->write;
 
38
        } else {
 
39
                $self->Makefile->write;
 
40
        }
 
41
 
 
42
        # The Makefile write process adds a couple of dependencies,
 
43
        # so write the META.yml files after the Makefile.
 
44
        $self->Meta->write        if $args{meta};
 
45
        $self->Meta->write_mymeta if $self->mymeta;
 
46
 
 
47
        return 1;
 
48
}
 
49
 
 
50
1;