Changeset 1780

Show
Ignore:
Timestamp:
02/20/06 14:34:11
Author:
miyagawa
Message:

0.06

Files:

Legend:

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

    r1507 r1780  
    11Revision history for Perl extension Template::Plugin::Clickable 
     2 
     30.06  2006-02-20T04:54:28Z 
     4        - Added supporf of rel="nofollow" 
     5          (Thanks to Tokuhiro Matsuno) 
    26 
    370.05  Fri Dec 24 04:08:14 JST 2004 
  • Template-Plugin-Clickable/trunk/META.yml

    r1507 r1780  
    22#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX# 
    33name:         Template-Plugin-Clickable 
    4 version:      0.04 
     4version:      0.06 
    55version_from: lib/Template/Plugin/Clickable.pm 
    66installdirs:  site 
  • Template-Plugin-Clickable/trunk/lib/Template/Plugin/Clickable.pm

    r1507 r1780  
    22 
    33use strict; 
    4 use vars qw($VERSION); 
    5 $VERSION = 0.05; 
     4our $VERSION = 0.06; 
    65 
    76require Template::Plugin; 
     
    3332                    my($uri, $orig_uri) = @_; 
    3433                    my $target = $config->{target} ? qq( target="$config->{target}") : ''; 
    35                     return qq(<a href="$uri"$target>$orig_uri</a>); 
     34                    my $rel    = $config->{rel}    ? qq( rel="$config->{rel}") : ''; 
     35                    return qq(<a href="$uri"$target$rel>$orig_uri</a>); 
    3636                }, 
    3737            ); 
  • Template-Plugin-Clickable/trunk/t/01_clickable.t

    r605 r1780  
    2222<a href="http://www.template-toolkit.org/" target="_blank">http://www.template-toolkit.org/</a> 
    2323<a href="http://www.template-toolkit.org/" target="_blank">http://www.template-toolkit.org/</a> 
     24 
     25--test-- 
     26[% USE Clickable -%] 
     27[% FILTER clickable target => '_blank', rel => 'nofollow' -%] 
     28http://www.template-toolkit.org/ 
     29[%- END %] 
     30[% FILTER clickable rel => 'nofollow' -%] 
     31http://www.template-toolkit.org/ 
     32[%- END %] 
     33--expect-- 
     34<a href="http://www.template-toolkit.org/" target="_blank" rel="nofollow">http://www.template-toolkit.org/</a> 
     35<a href="http://www.template-toolkit.org/" rel="nofollow">http://www.template-toolkit.org/</a>