Bigtop

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN


    my \$tent_path = Bigtop::TentMakerPath->get_template_path();

=head1 DESCRIPTION

Duing initial perl Build.PL, the user is asked to supply a path for
tentmaker's templates.  If they do that, this module is written and
later installed, to keep track of where the user wanted the templates.
Then, tentmaker can call get_template_path to find out where they are.

=head1 METHODS

=over 4

=item get_template_path

Returns the path, specified by the installing user, to the tentmaker templates.

=back

=head1 AUTHOR

Phil Crow, E<lt>crow.phil\@gmail.comE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2006, Phil Crow

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.6 or,
at your option, any later version of Perl 5 you may have available.

=cut
EO_TENT_PATH
            close $TENT_PATH;
        }
    }
}
else {
    print "\n\n  Bigtop has an editor called tentmaker.  You need to\n";
    print "  install Gantry, AND re-run Build.PL, in order to use it.\n\n\n";
    $build->notes( install_tentmaker => 0 );
}

$build->create_build_script;

sub _custom_code {
    return q{
        sub ACTION_install {
            my $self = shift;

            $self->SUPER::ACTION_install();

            return unless ( $self->notes( 'install_tentmaker' ) );

            my $props = $self->{properties};
            my $files = $props->{tentmaker_files};

            my $path  = $self->notes( 'tentmaker_template_path' );
            foreach my $file ( @{ $files } ) {
                $self->copy_if_modified( $file, $path );
            }
            print "installed tentmaker templates to $path\n";
        }
        sub ACTION_dist {
            my $self = shift;

            if ( -x 'skip/gendocs' ) {
                `skip/gendocs`;
            }

            $self->SUPER::ACTION_dist();
        }
    };
}



( run in 3.481 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )