Changeset 12404


Ignore:
Timestamp:
08/30/10 08:06:05 (18 months ago)
Author:
zenogantner
Message:

Shell Script plugin: comment support, added

Location:
trunk/Padre-Plugin-ShellScript
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-ShellScript/Changes

    r12029 r12404  
    110.02    to be released 
    22        compatibility to newer versions of Padre (ZENOG) 
     3    added $VERSION variable (ZENOG) 
     4    comment support (ZENOG) 
    35 
    460.01    2009.02.01 
  • trunk/Padre-Plugin-ShellScript/Makefile.PL

    r12029 r12404  
    22use inc::Module::Install; 
    33 
    4 name           'Padre-Plugin-ShellScript'; 
    5 license        'perl'; 
    6 author         'Claudio Ramirez'; 
    7 all_from       'lib/Padre/Plugin/ShellScript.pm'; 
     4name 'Padre-Plugin-ShellScript'; 
     5license 'perl'; 
     6author 'Claudio Ramirez'; 
     7all_from 'lib/Padre/Plugin/ShellScript.pm'; 
    88 
    9 requires       'perl'                    => '5.008001'; 
    10 requires       'Exporter'                => 0; 
    11 requires       'Padre'                   => '0.65'; 
    12 requires       'Class::Autouse'          => '1.26'; 
     9requires 'perl'           => '5.008001'; 
     10requires 'Exporter'       => 0; 
     11requires 'Padre'          => '0.65'; 
     12requires 'Class::Autouse' => '1.26'; 
    1313 
    14 test_requires  'Test::More'              => '0.47'; 
    15 test_requires  'Test::NeedsDisplay'      => '1.05'; 
    16 test_requires  'Test::NoWarnings'        => '0.084'; 
    17 no_index       'directory' => [ qw{ t xt eg share inc privinc} ]; 
     14test_requires 'Test::More'         => '0.47'; 
     15test_requires 'Test::NeedsDisplay' => '1.05'; 
     16test_requires 'Test::NoWarnings'   => '0.084'; 
     17no_index 'directory'               => [qw{ t xt eg share inc privinc}]; 
    1818 
    19 homepage       'http://padre.perlide.org/'; 
    20 bugtracker     'http://padre.perlide.org/'; 
    21 repository     'http://svn.perlide.org/padre/trunk/Padre-Plugin-ShellScript'; 
     19homepage 'http://padre.perlide.org/'; 
     20bugtracker 'http://padre.perlide.org/'; 
     21repository 'http://svn.perlide.org/padre/trunk/Padre-Plugin-ShellScript'; 
     22 
    2223#mailinglist    'http://mail.perlide.org/mailman/listinfo/padre-dev'; 
    2324 
    2425is_padre_plugin; # authors: Install Module::Install::PadrePlugin 
    25   
     26 
    2627WriteAll; 
  • trunk/Padre-Plugin-ShellScript/lib/Padre/Document/ShellScript.pm

    r3129 r12404  
    66use Padre::Document (); 
    77 
    8 our $VERSION = '0.27'; 
     8our $VERSION = '0.02'; 
    99our @ISA     = 'Padre::Document'; 
    1010 
    1111sub get_command { 
    12         my $self     = shift; 
    13         my $debug    = shift; 
     12    my $self  = shift; 
     13    my $debug = shift; 
    1414 
    15         # Check the file name 
    16         my $filename = $self->filename; 
     15    # TODO get shebang 
    1716 
    18         my $dir = File::Basename::dirname($filename); 
    19         chdir $dir; 
    20         return $debug 
    21                 ? qq{"sh" "-xv" "$filename"} 
    22                 : qq{"sh" "$filename"}; 
     17    # Check the file name 
     18    my $filename = $self->filename; 
     19 
     20    my $dir = File::Basename::dirname($filename); 
     21    chdir $dir; 
     22    return $debug 
     23        ? qq{"sh" "-xv" "$filename"} 
     24        : qq{"sh" "$filename"}; 
    2325} 
    2426 
    25 sub errstr { 
    26         # Empty placeholder 
    27         } 
    28  
     27sub comment_lines_str { 
     28    return '#'; 
     29} 
    2930 
    30311; 
    31 # Copyright 2008-2009 The Padre development team as listed in Padre.pm. 
     32 
     33# Copyright 2008-2010 The Padre development team as listed in Padre.pm. 
    3234# LICENSE 
    3335# This program is free software; you can redistribute it and/or 
  • trunk/Padre-Plugin-ShellScript/lib/Padre/Plugin/ShellScript.pm

    r12029 r12404  
    55use 5.008; 
    66 
     7our $VERSION = '0.02'; 
     8 
    79use base 'Padre::Plugin'; 
    810use Class::Autouse 'Padre::Document::ShellScript'; 
     
    1012# The plugin name to show in the Plugin Manager and menus 
    1113sub plugin_name { 
    12     'Shell Script Plugin'; 
     14    'Shell Script'; 
    1315} 
    1416 
    1517# Declare the Padre interfaces this plugin uses 
    1618sub padre_interfaces { 
    17     'Padre::Plugin'     => 0.43, 
    18       'Padre::Document' => 0.43, 
    19       'Padre::Wx::Main' => 0.43, 
    20       ; 
     19    'Padre::Plugin' => 0.43, 'Padre::Document' => 0.43, 'Padre::Wx::Main' => 0.43,; 
    2120} 
    2221 
    2322sub registered_documents { 
    24     'application/x-shellscript' => 'Padre::Document::ShellScript', 
    25       ; 
     23    'application/x-shellscript' => 'Padre::Document::ShellScript',; 
    2624} 
    2725 
    2826# The command structure to show in the Plugins menu 
    2927sub menu_plugins_simple { 
    30     my $self = shift; 
    31     'Shell Script' => [ Information => sub { $self->info() }, ]; 
     28    my $self = shift; 
     29    'Shell Script' => [ Information => sub { $self->info() }, ]; 
    3230} 
    3331 
    3432sub info { 
    35     my $self = shift; 
     33    my $self = shift; 
    3634 
    37     # Generate the About dialog 
    38     my $about = Wx::AboutDialogInfo->new; 
    39     $about->SetName("Shell Script Plugin"); 
    40     $about->SetDescription("Use the Run menu to run and debug shell scripts."); 
     35    # Generate the About dialog 
     36    my $about = Wx::AboutDialogInfo->new; 
     37    $about->SetName("Shell Script Plugin"); 
     38    $about->SetDescription("Use the Run menu to run and debug shell scripts."); 
    4139 
    42     # Show the About dialog 
    43     Wx::AboutBox($about); 
     40    # Show the About dialog 
     41    Wx::AboutBox($about); 
    4442 
    45     return; 
     43    return; 
    4644} 
    47451; 
     
    5856=head1 COPYRIGHT & LICENSE 
    5957 
    60 Copyright 2009 Claudio Ramirez all rights reserved. 
     58Copyright 2009-2010 Claudio Ramirez all rights reserved. 
    6159 
    6260This program is free software; you can redistribute it and/or modify it 
  • trunk/Padre-Plugin-ShellScript/t/01-load.t

    r3127 r12404  
    22 
    33use strict; 
     4 
    45BEGIN { 
    56    $|  = 1; 
     
    1718ok( $] >= 5.008, 'Perl version is new enough' ); 
    1819 
    19 use_ok( 'Wx'                             ); 
     20use_ok('Wx'); 
    2021diag( "Tests find Wx: $Wx::VERSION " . Wx::wxVERSION_STRING() ); 
    21 use_ok( 'Padre::Plugin::ShellScript'      ); 
     22use_ok('Padre::Plugin::ShellScript'); 
Note: See TracChangeset for help on using the changeset viewer.