File: declaration.pl

package info (click to toggle)
libhtml-stripscripts-perl 1.06-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 568 kB
  • sloc: perl: 1,006; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl
use strict;
use warnings;

use HTML::StripScripts::Parser();
use MyStripScripts();

my $html = <<HTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Test</title>
  </head>
  <body>
    Some text
  </body>
</html>
HTML


my $original = HTML::StripScripts::Parser->new({ Context => 'Document' });
print "\nDocument filtered via HTML::StripScripts::Parser:\n";
print   "-------------------------------------------------\n\n";
print $original->filter_html($html);

my $new      = MyStripScripts->new({ Context => 'Document' });
print "\n\nDocument filtered via MyStripScripts:\n";
print     "-------------------------------------\n\n";
print $new->filter_html($html);

print "\n\n";