Padre::Transform - Padre Document Transform API


Padre documentation Contained in the Padre distribution.

Index


Code Index:

NAME

Top

Padre::Transform - Padre Document Transform API

DESCRIPTION

Top

This is the base class for the Padre transform API.

I'll document this more later...

-- Adam K

METHODS

Top

new

A default constructor for transform objects.

Takes arbitrary key/value pair parameters and returns a new object.

apply

  $transform->apply( $padre_document );

The apply method takes a Padre::Document object and modifies it in place. Returns true if the document was changed, false if not, or throws an exception on error.

COPYRIGHT & LICENSE

Top


Padre documentation Contained in the Padre distribution.
package Padre::Transform;

use 5.008;
use strict;
use warnings;
use Params::Util ();

our $VERSION = '0.86';

#####################################################################
# Constructor

sub new {
	my $class = shift;
	bless {@_}, $class;
}

#####################################################################
# Main Methods

sub apply {
	my $self = shift;
	my $document = Params::Util::_INSTANCE( shift, 'Padre::Document' );
	unless ($document) {
		die 'Did not provide a Padre::Document object to apply';
	}

	# Null transform

	return '';
}

1;

# Copyright 2008-2011 The Padre development team as listed in Padre.pm.
# LICENSE
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl 5 itself.