http://www.template-toolkit.org/docs/plain/Modules/Template/Plugin/Autoformat.html

I'm failing to get the Autoformat plugin to work.  Am I missing
something obvious?

#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use Text::Autoformat;

my $block = <<EOT;
     Outside TT.
     Be not afeard.  The isle is full of noises, sounds and sweet
     airs that give delight but hurt not.
EOT

print autoformat( $block, { left => 10, right => 40, case => 'upper'} );

use Template;
Template->new->process(\*DATA,{});

__END__

    # define some text for the examples
    [% text = BLOCK %]
       Be not afeard.  The isle is full of noises, sounds and sweet 
       airs that give delight but hurt not.
    [% END %]

    # pass options to constructor...
    [% USE autoformat(case => 'upper') %]
    [% autoformat(text) %]

    # Again
    [% autoformat(text, case => 'upper' ) %]



[EMAIL PROTECTED]:~$ perl af.pl
         OUTSIDE TT. BE NOT AFEARD. THE
         ISLE IS FULL OF NOISES, SOUNDS
         AND SWEET AIRS THAT GIVE
         DELIGHT BUT HURT NOT.


    # define some text for the examples
    

    # pass options to constructor...
    
    
       Be not afeard.  The isle is full of noises, sounds and sweet 
       airs that give delight but hurt not.
    
    # Again
    
       Be not afeard.  The isle is full of noises, sounds and sweet 
       airs that give delight but hurt not.
    



-- 
Bill Moseley
[EMAIL PROTECTED]


_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to