Padre::Plugin::Filter - Unix-like external filters in Padre.


Padre-Plugin-Filter documentation Contained in the Padre-Plugin-Filter distribution.

Index


Code Index:

NAME

Top

Padre::Plugin::Filter - Unix-like external filters in Padre.

DESCRIPTION

Top

This plug-in enables the use of Unix-like external filtering commands/scripts to transform part or all of the current document.

The output of the filter can either replace the input, be appended to the input, or be inserted into a new document.

Unlike Unix filters, the filter mechanism in this plug-in is designed to use input and output files rather than STDIN and STDOUT.

See Padre::Plugin::Shell::Filter for details.

ENVIRONMENT VARIABLES

Top

To provide additional information for the plugin, various environment variables are set prior to performing the plugin action. These environment variables are covered in the Padre::Plugin::Shell::Base documentation.

AUTHOR

Top

Gregory Siems <gsiems@gmail.com>

COPYRIGHT AND LICENSE

Top


Padre-Plugin-Filter documentation Contained in the Padre-Plugin-Filter distribution.

package Padre::Plugin::Filter;
use base 'Padre::Plugin';

use 5.008;
use strict;
use warnings;
use Padre::Plugin ();
use Padre::Wx     ();
use Padre::Plugin::Shell::Filter;

our $VERSION = '0.1';

my $filter_plugin;

#####################################################################
# Padre::Plugin Methods
sub plugin_name {
    'Filter';
}

sub padre_interfaces {
    'Padre::Plugin' => 0.43;
}

sub menu_plugins_simple {
    my ($self) = @_;

    $filter_plugin = Padre::Plugin::Shell::Filter->new();
    my @filter_menu = $filter_plugin->plugin_menu();
    unless (@filter_menu) {
        my $msg = Wx::gettext("Error loading filter menu");
        @filter_menu = ( $msg => undef );
    }
    '&Filter' => [@filter_menu];
}

1;

__END__