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  -  TEST::INLINE::CONTENT::LEGACY (3)

.ds Aq ’

NAME

Test::Inline::Content::Legacy - Test::Inline 2 Content Handler for legacy functions

CONTENTS

SYNOPSIS

Custom script content generation using Test::Inline 2.000+ with a custom generator functions



  my $header = "....";
  my $function = sub {
        my $Object = shift;
        my $Script = shift;
        return $header . $Script->merged_content;
  };
 
  my $Inline = Test::Inline->new(
        ...
        file_content => $function,
        );



Migrating this same code to Test::Inline 2.100+ ContentHandler objects



  my $header = "....";
  my $function = sub {
        my $Object = shift;
        my $Script = shift;
        return $header . $Script->merged_content;
  };
 
  my $ContentHandler = Test::Inline::Content::Legacy->new( $function );
 
  my $Inline = Test::Inline->new(
        ...
        ContentHandler => $ContentHandler,
        );



DESCRIPTION

This class exists to provide a migration path for anyone using the custom script generators in Test::Inline via the file_content param.

The synopsis above pretty much says all you need to know.

METHODS

new CW$CODE_ref

The new constructor for Test::Inline::Content::Legacy takes a single parameter of a CODE reference, as you would have previously provided directly to file_content.

Returns a new Test::Inline::Content::Legacy object, or undef if not passed a CODE reference.

    coderef

The coderef accessor returns the CODE reference for the object

process CW$Inline CW$Script

The process method works with the legacy function by passing the Test::Inline and Test::Inline::Script arguments straight through to the legacy function, and returning it’s result as the return value.

SUPPORT

See the main SUPPORT section.

AUTHOR

Adam Kennedy <adamk@cpan.org>, <http://ali.as/>

COPYRIGHT

Copyright 2004 - 2013 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 TEST::INLINE::CONTENT::LEGACY (3) 2013-04-09

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