Changes between Version 23 and Version 24 of PadrePluginFix


Ignore:
Timestamp:
Mar 26, 2012, 1:37:55 PM (3 years ago)
Author:
bowtie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PadrePluginFix

    v23 v24  
    11[[PageOutline(2-4)]] 
    2 == Padre::Plugin::Fix == 
     2== {{{Padre::Plugin::Fix}}} 
    33=== Usage 
    44* install Padre-Plugin-Fix 
     
    9494[[Image(PadrePluginFix.png)]] 
    9595 
     96---- 
     97== Tester 
     98* assuming modern perl 
     99{{{#!perl 
     100#!/usr/bin/env perl 
     101 
     102use 5.014; 
     103use strict; 
     104use warnings; 
     105 
     106use Carp; 
     107 
     108# Turn on $OUTPUT_AUTOFLUSH 
     109$| = 1; 
     110use feature 'unicode_strings'; 
     111 
     112#1, the following " -> ' try for your self 
     113open ( my $filehandle, "<:utf8", "test.bin") or die $!; 
     114 
     115#2, food for thought only 
     116#before open ( my $filehandle, "<:utf8", "test.bin") or die $!; 
     117#after use Carp; 
     118#after my $filehandle = undef; 
     119#after open ( $filehandle, '<:encoding(UTF-8)', 'test.bin') or croak $!; 
     120 
     121my $word = readline $filehandle; 
     122 
     123#3, food for thought only 
     124#before print "word = $word\n"; 
     125#after say 'word ='.$word; 
     126 
     127#4, food for thought only, an evil null if =~ fails 
     128#before my ($untainted) = $word =~ /^(\w+)$/; 
     129#after my $untainted = undef; 
     130#after $untainted = $word =~ /^(\w+)$/; 
     131 
     132say "untainted = $untainted"; 
     133 
     134if ($untainted) { 
     135    # It passed the regex, so it is "safe". 
     136    system "echo $untainted"; 
     137} 
     138 
     1391; 
     140 
     141__END__ 
     142}}} 
     143---- 
    96144== TODO == 
    97145