~ubuntu-branches/ubuntu/oneiric/libconvert-pem-perl/oneiric

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Rivas, gregor herrmann, Nathan Handler, Jose Luis Rivas
  • Date: 2010-12-25 15:58:17 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101225155817-mgdr457j5e61tvem
Tags: 0.08-1
[ gregor herrmann ]
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
  (source stanza).

[ Nathan Handler ]
* debian/watch: Update to ignore development releases.

[ gregor herrmann ]
* Change my email address.

[ Jose Luis Rivas ]
* New upstream release.
* debian/control: 
        + Added myself to uploaders field.
  + Refreshed.
  + Bumped to Standards-Version 3.9.1 by removing versioned perl and 
  versioning debhelper >= 7.
* debian/compat,copyright: refreshed.
* debian/rules: refreshed to tiny version using DH7.
* debian/libconvert-pem-perl.docs: Added.
* Switch to dpkg-source 3.0 (quilt) format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#line 1 "inc/Module/Install/WriteAll.pm - /Library/Perl/5.8.1/Module/Install/WriteAll.pm"
 
1
#line 1
2
2
package Module::Install::WriteAll;
3
 
use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
3
 
 
4
use strict;
 
5
use Module::Install::Base ();
 
6
 
 
7
use vars qw{$VERSION @ISA $ISCORE};
 
8
BEGIN {
 
9
        $VERSION = '1.00';
 
10
        @ISA     = qw{Module::Install::Base};
 
11
        $ISCORE  = 1;
 
12
}
4
13
 
5
14
sub WriteAll {
6
 
    my $self = shift;
7
 
    my %args = (
8
 
        meta => 1,
9
 
        sign => 0,
10
 
        inline => 0,
11
 
        check_nmake => 1,
12
 
        @_
13
 
    );
14
 
 
15
 
    $self->sign(1) if $args{sign};
16
 
    $self->Meta->write if $args{meta};
17
 
    $self->admin->WriteAll(%args) if $self->is_admin;
18
 
 
19
 
    if ($0 =~ /Build.PL$/i) {
20
 
        $self->Build->write;
21
 
    }
22
 
    else {
 
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
 
23
27
        $self->check_nmake if $args{check_nmake};
24
 
        $self->makemaker_args( PL_FILES => {} )
25
 
            unless $self->makemaker_args->{'PL_FILES'};
26
 
 
27
 
        if ($args{inline}) {
28
 
            $self->Inline->write;
29
 
        }
30
 
        else {
31
 
            $self->Makefile->write;
32
 
        }
33
 
    }
 
28
        unless ( $self->makemaker_args->{PL_FILES} ) {
 
29
                # XXX: This still may be a bit over-defensive...
 
30
                unless ($self->makemaker(6.25)) {
 
31
                        $self->makemaker_args( PL_FILES => {} ) if -f 'Build.PL';
 
32
                }
 
33
        }
 
34
 
 
35
        # Until ExtUtils::MakeMaker support MYMETA.yml, make sure
 
36
        # we clean it up properly ourself.
 
37
        $self->realclean_files('MYMETA.yml');
 
38
 
 
39
        if ( $args{inline} ) {
 
40
                $self->Inline->write;
 
41
        } else {
 
42
                $self->Makefile->write;
 
43
        }
 
44
 
 
45
        # The Makefile write process adds a couple of dependencies,
 
46
        # so write the META.yml files after the Makefile.
 
47
        if ( $args{meta} ) {
 
48
                $self->Meta->write;
 
49
        }
 
50
 
 
51
        # Experimental support for MYMETA
 
52
        if ( $ENV{X_MYMETA} ) {
 
53
                if ( $ENV{X_MYMETA} eq 'JSON' ) {
 
54
                        $self->Meta->write_mymeta_json;
 
55
                } else {
 
56
                        $self->Meta->write_mymeta_yaml;
 
57
                }
 
58
        }
 
59
 
 
60
        return 1;
34
61
}
35
62
 
36
63
1;