GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PPI::DOCUMENT::NORMALIZED (3)

.ds Aq ’

NAME

PPI::Document::Normalized - A normalized Perl Document

CONTENTS

DESCRIPTION

A Normalized Document object is the result of the normalization process contained in the PPI::Normal class. See the documentation for PPI::Normal for more information.

The object contains a version stamp and function list for the version of PPI::Normal used to create it, and a processed and delinked PPI::Document object.

Typically, the Document object will have been mangled by the normalization process in a way that would make it fatal to try to actually DO anything with it.

Put simply, <B>neverB> use the Document object after normalization. <B>YOU HAVE BEEN WARNED!B>

The object is designed the way it is to provide a bias towards false negatives. A comparison between two ::Normalized object will only return true if they were produced by the same version of PPI::Normal, with the same set of normalization functions (in the same order).

You may get false negatives if you are caching objects across an upgrade.

Please note that this is done for security purposes, as there are many cases in which low layer normalization is likely to be done as part of a code security process, and false positives could be highly dangerous.

METHODS

    new

The new method is intended for use only by the PPI::Normal class, and to get ::Normalized objects, you are highly recommended to use either that module, or the normalized method of the PPI::Document object itself.

    version

The version accessor returns the PPI::Normal version used to create the object.

    functions

The functions accessor returns a reference to an array of the normalization functions (in order) that were called when creating the object.

equal CW$Normalized

The equal method is the primary comparison method, taking another PPI::Document::Normalized object, and checking for equivalence to it.

The == operator is also overload to this method, so that you can do something like the following:



  my $first  = PPI::Document->load(first.pl);
  my $second = PPI::Document->load(second.pl);
 
  if ( $first->normalized == $second->normalized ) {
        print "The two documents are equivalent";
  }



Returns true if the normalized documents are equivalent, false if not, or undef if there is an error.

SUPPORT

See the support section in the main module.

AUTHOR

Adam Kennedy <adamk@cpan.org>

COPYRIGHT

Copyright 2005 - 2011 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PPI::DOCUMENT::NORMALIZED (3) 2014-11-11

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.