Changeset 185

Show
Ignore:
Timestamp:
01/25/07 02:48:25 (3 years ago)
Author:
gboggs
Message:

Corrected the path in the copy operation. Made the module OO inheritable. Set the Id keywords.

Location:
trunk/tools/PluginBuilder
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/tools/PluginBuilder/lib/PluginBuilder.pm

    • Property svn:keywords changed from Id Revision to Id
    r153 r185  
     1# $Id$ 
     2 
    13package PluginBuilder; 
    2 our $VERSION = '0.00_4'; 
    3 # $Id$ 
     4our $VERSION = '0.00_5'; 
    45use strict; 
    56use warnings; 
     
    2526 
    2627sub new { 
    27     my $class = shift; 
     28    my $proto = shift; 
     29    my $class = ref $proto || $proto; 
    2830    my $self = {}; 
    2931    bless $self, $class; 
     
    8789 
    8890    eval{ GetOptions(%o) };  # Grab the command-line options. 
    89  
    90     # Gracefully bail-out if something went wrong. 
     91    # And gracefully bail-out if something went wrong. 
    9192    if( $@ || !${$o{'archive=s'}}   || 
    9293              !${$o{'build-dir=s'}} || 
     
    141142        # Populate the path with the files. 
    142143        for my $file ( @{ $self->{types}{$type}{files} } ) { 
    143             my $dest = File::Spec->catfile( $dir, scalar(fileparse($file)) ); 
     144            my $dest = File::Spec->catfile( $path, scalar(fileparse($file)) ); 
    144145            copy( $file, $dest ) or die "Can't copy $file, $dest: $!" 
    145146                unless $self->{debug}; 
     
    179180=head2 new 
    180181 
     182  PluginBuilder->new(); 
     183 
    181184Return a new C<PluginBuilder> object. 
    182185 
  • trunk/tools/PluginBuilder/plugin-builder.cgi

    • Property svn:keywords changed from Id Revision to Id
  • trunk/tools/PluginBuilder/plugin-builder.pl

    • Property svn:keywords changed from Id Revision to Id
    r151 r185  
    33use strict; 
    44use warnings; 
     5 
     6# Run from the PluginBuilder directory or an MT directory with 
     7# PluginBuilder installed. 
    58use lib qw( lib plugins/tools/PluginBuilder/lib ); 
    69use PluginBuilder; 
    710our $VERSION = $PluginBuilder::VERSION; 
     11 
    812my $p = PluginBuilder->new(); 
     13 
    914$p->get_options(); 
     15 
    1016$p->build(); 
    1117 
     
    1319=head1 NAME 
    1420 
    15 plugin-builder.pl - Command-line, Movable Type plugin stub builder 
     21plugin-builder.pl - Movable Type command-line plugin stub builder 
    1622 
    1723=head1 SYNOPSIS 
  • trunk/tools/PluginBuilder/t/podcoverage.t

    r148 r185  
    4040    my $pc = Pod::Coverage->new( 
    4141        package => $module, 
    42         trustme => $trustme, 
    43         pod_from => $pod_from, 
     42#        trustme => $trustme, 
     43#        pod_from => $pod_from, 
    4444    ); 
    4545    my $coverage = $pc->coverage; 
     
    5353        $uncovered += $naked_count; 
    5454        is($coverage, 1, "$module: $cover_count/" . ($cover_count+$naked_count)) 
    55             or diag("pod coverage is $c%. missing pod for: " . join(", ", sort @naked)); 
     55            or diag($pc->why_unrated . " $c%. missing pod for: " . join(", ", sort @naked)); 
    5656    } else { 
    5757        SKIP: { skip("$module: " . $pc->why_unrated, 1); }