Acme-Tools

 view release on metacpan or  search on metacpan

Tools.pm  view on Meta::CPAN

  }
  unlink $argv[0] if $stdin;
}

sub cmd_rttop   { die "rttop: not implemented here yet.\n" }
sub cmd_whichpm { die "whichpm: not implemented here yet.\n" } #-a (all, inkl VERSION og ls -l)
sub cmd_catal   { die "catal: not implemented here yet.\n" } #-a (all, inkl VERSION og ls -l)
#todo: cmd_tabdiff (fra sonyk)
#todo: cmd_catlog (ala catal med /etc/catlog.conf, default er access_log)

=head1 DATABASE STUFF - NOT IMPLEMENTED YET

Uses L<DBI>. Comming soon...

  $Dbh
  dlogin
  dlogout
  drow
  drows
  drowc
  drowsc

t/12_ht2t.t  view on Meta::CPAN

# perl Makefile.PL;make;perl -Iblib/lib t/12_ht2t.t
use lib '.'; BEGIN{require 't/common.pl'}
use Test::More tests => 5;
my $html=join"",<DATA>;
my %ent=(amp => '&', 160 => ' ');
my $entqr=join"|",keys%ent;
#$html=~s,&#?($entqr);,$ent{$1},g;
my @t0=ht2t($html);
my @t1=ht2t($html,"Tab"); #die serialize(\@t1,'t1','',1);
my @t2=ht2t($html,"Table-2");
#my @k=ht2t($html,"Oslo fylke");#print serialize(\@k,'k','',1);
my $aa;
ok(($aa=join(",",grep{eval{ht2t(1..$_)};!$@}0..4)) eq '1,2,3', "antarg=$aa");
ok_ref( \@t0, \@t1, 't0');

t/12_ht2t.t  view on Meta::CPAN

  not this
  <table>
  <tr><td>asdf</td><td>asdf</td><td>asdf</td></tr> <tr><td>asdf</td><td>asdf</td><td>asdf</td></tr>
  </table>
  but this
  <table>
  <tr><td>&#160;12&#160;34</td><td>as\ndf</td><td>1234</td></tr>
  <tr><td>asdf</td><td>1234</td><td>as<b>df</b></td></tr>
  </table>

__DATA__
<html><body>
Table-1
<table>
<tr><td>123</td><td> Abc&amp;def</td></tr>
<tr><td>997</td><td>XYZ </td></tr>
</table>
Table-2 is here:
<table>
<tr><td>ZYX</td><td>SOS</td></tr>
<tr><td>SMS</td><td>OPP</td></tr>



( run in 0.770 second using v1.01-cache-2.11-cpan-140bd7fdf52 )