Changeset 796

Show
Ignore:
Timestamp:
11/14/02 13:50:31
Author:
miyagawa
Message:

0.03

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Template-Plugin-Comma/trunk/Changes

    r695 r796  
    11Revision history for Perl extension Template::Plugin::Comma 
    22 
    3 0.02 
     30.03  Thu Nov 14 13:47:51 JST 2002 
     4        * Fixed memory leak due to Template::Plugin::Filter 
     5 
     60.02  Thu Aug  1 14:12:12 JST 2002 
    47        - Added Template dependency on Makefile.PL 
    58        - Added reference to Number::Format 
  • Template-Plugin-Comma/trunk/lib/Template/Plugin/Comma.pm

    r695 r796  
    55$VERSION = 0.02; 
    66 
    7 require Template::Plugin::Filter
    8 use base qw(Template::Plugin::Filter); 
     7require Template::Plugin
     8use base qw(Template::Plugin); 
    99 
    10 use vars qw($DYNAMIC $FILTER_NAME); 
    11 $DYNAMIC = 1; 
     10use vars qw($FILTER_NAME); 
    1211$FILTER_NAME = 'comma'; 
    1312 
    14 sub init
    15     my $self = shift
    16     my $name = $self->{_ARGS}->[0] || $FILTER_NAME; 
    17     $self->install_filter($name); 
     13sub new
     14    my($self, $context, @args) = @_
     15    my $name = $args[0] || $FILTER_NAME; 
     16    $context->define_filter($name, \&commify, 0); 
    1817    return $self; 
    19 } 
    20  
    21 sub filter { 
    22     my($self, $text, $args, $config) = @_; 
    23     return commify($text); 
    2418} 
    2519