source: perl/modules/Facebook/inc/Module/Install/WriteAll.pm @ 24bd860

release-1.10release-1.9
Last change on this file since 24bd860 was 24bd860, checked in by Edward Z. Yang <ezyang@mit.edu>, 13 years ago
Initial commit of Facebook module implementation. This module was inspired by Kevin Riggle's Facebook-hacked-onto-Twitter implementation, but was rewritten to stand alone as its own module and use the new Facebook Graph API. It requires the Facebook::Graph CPAN module. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
  • Property mode set to 100644
File size: 1.1 KB
Line 
1#line 1
2package Module::Install::WriteAll;
3
4use strict;
5use Module::Install::Base ();
6
7use vars qw{$VERSION @ISA $ISCORE};
8BEGIN {
9        $VERSION = '0.91';;
10        @ISA     = qw{Module::Install::Base};
11        $ISCORE  = 1;
12}
13
14sub 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        if ( $args{meta} ) {
45                $self->Meta->write;
46        }
47
48        # Experimental support for MYMETA
49        if ( $ENV{X_MYMETA} ) {
50                if ( $ENV{X_MYMETA} eq 'JSON' ) {
51                        $self->Meta->write_mymeta_json;
52                } else {
53                        $self->Meta->write_mymeta_yaml;
54                }
55        }
56
57        return 1;
58}
59
601;
Note: See TracBrowser for help on using the repository browser.