Rate a distribution
Find a distribution you would like to review:
Recent reviews (RSS feed)
Of the HTML tag restricting modules on CPAN, this, along with HTML::Scrubber, is reliable and can be recommended. Like HTML::Scrubber, it's based on HTML::Parser, and its outputs are very similar to HTML::Scrubber's.
This module works correctly to remove unwanted HTML tags from text.
The output is nearly identical to that of HTML::Restrict. Differences include:
* Scrubber converts > and < into HTML entities, whereas Restrict doesn't. Scrubber doesn't, however, convert & into an HTML entity, as it should do if it's going to convert < and >. This bug will bite you if you have both & gt; (ampersand, lower case g, lower case t, semicolon) and > in your input. Note that CPAN ratings has the same bug:
* Scrubber leaves all the whitespace at the beginning and end of the text, whereas Restrict removes it (even including the final newline, which seems like a bug to me.) If you use the following:
my $hr = HTML::Restrict->new (
trim => 0,
you get identical outputs from either one.
HTML::Strip works well enough to remove the tags from HTML, and it also removes the contents of <script>..</script> and HTML comments correctly, so it's mostly OK, but it has some rather odd bugs regarding whitespace. Here is a diff of the output of HTML::Strip compared to HTML::Restrict or HTML::Scrubber:
< strokes in the correct order and direction .
> strokes in the correct order and direction.
< discussion forum .
> discussion forum.
< the KanjiVG project . The
> the KanjiVG project. The
All of the odd whitespace appeared where there is an </a> tag in the original HTML. That kind of bug should be pretty easy to fix in Perl, but it seems like this is a C program with a minimal Perl wrapper.
Unfortunately, the above behaviour is the documented behaviour of the module:
"Anything that looks like a tag, or group of tags will be replaced with a single space character."
Possibly if you want something which works very fast this is the right choice, but other than that I would rather use something which gives a better representation of the original text.
Although it's quite old, the module installed without problems.
The default behaviour seems quite zany. The default setup converts comments in the HTML into escaped entities, like this:
<!-- comment -->
If I added this to the object creation:
my $htf = HTML::TagFilter->new (
strip_comments => 1,
then it would correctly strip out the comments, so it must be recognising them as comments, and yet it does this zany conversion which results in visible things appearing which were meant to be HTML comments. I don't see anywhere in the documentation where it explains the rationale for that, and it just seems like a bug to me.
This module probably didn't work correctly in 2005, and it cannot be recommended in 2017. I suggest trying out HTML::Restrict, HTML::Scrubber, or HTML::Strip instead.
(There is a bug in cpan ratings where it is failing to convert & into & correctly, so excuse me if this text becomes incomprehensible.)
On the positive side the module has zero dependencies and installs without any issues. On the negative side, the lists of HTML tags in this module predate HTML5, and its <marquee> and <blink>-removing code is obsolete in 2017.
The module has problems compared to the alternatives. Given
x = y;
detoxify ($html, disallow => [qw(everything)]);
just removes the <script> and </script> and leaves the x = y; part, which is definitely not desirable.
Although the module seems to represent quite a lot of work, the most recent update was in 2004, to version 0.02, so I recommend considering alternative modules like HTML::Restrict, HTML::Strip, or HTML::Scrubber, all of which will remove the text between <script> and </script> tags.
Perhaps it is worth pointing out that a script called "json_xs" with output which is identical except for sorting the order of hash keys was already in JSON::XS when this was released to CPAN:
A similar script is also in the Cpanel::JSON::XS as cpanel_json_xs:
Thanks to this fantastic library, there is no more reason for Perl hackers to code for their PI in Python. The package is very well documented, the interface is intuitive, the author is extremely responsive and helpful. Five stars out of five!
Clean, concise, well thought out design, not dependent on anything but core modules,very fast, by far the best module on CPAN for this task. Combine this with Mouse for OOP and type checking and you have Modern Perl with strict type checking that's faster than any other offering on CPAN.
Incredible module, takes excellent Moose OOP ideas and makes them fast, faster than anything, faster than raw Perl methods, faster even than accessors in other languages, combine it with Function::Parameters and you have Modern Perl with strict type checking and it's fast!
I only use this module for parsing command-line options in Perl. It does almost everything, and if you think you might need something which does something more complicated than what this does, consider whether you might be overcomplicating your problem.
Some people, when faced with the problem of setting up options for a complex project, think "I know, I'll use AppConfig". Now they have two problems.
I used AppConfig for one project, in about 2008 or 2009, and have been regretting it ever since, and unfortunately I still have not got around to removing the thing.
The maintainer used to be the same person as the Template Toolkit so I thought this must be OK, and I delved deeply into all the complexities of AppConfig, thinking this must be the cool way to set up my configuration. What I realised too late is that this thing is just far too complicated and convoluted for normal people to be able to cope with, it has too many ins and outs, and I really did not need to use anything this tortuous. Adding this configuration system to my already complex project just made the whole thing into a nightmare.
Since learning the error of my ways, I have never used any other command-line module except for Getopt::Long.
This module seems to have been abandoned. If you try to install this, its tests won't work with a modern C compiler, because it refers to a non-standard header file malloc.h which is apparently from the ancient days of Linux.
If you are considering what module to use for testing your Perl code, please consider using Test::More rather than this. Test::More is currently maintained and is a standard module for testing Perl.
Test::Unit has been abandoned for more than ten years. Sadly this also means that all the other modules which depend on Test::Unit often don't install any more:
This failure doesn't show up in the CPAN testers' results for the dependent modules because, since Test::Unit fails to install, a module which is dependent on it never even gets to the point of being tested, because the installation bails out after failing to install this.
Unfortunately the only review here on CPAN ratings which is still accurate in 2017, the one which says Test::Unit doesn't install on many systems, is the one which is downvoted so that it has disappeared.
There is a file AUTHORS with ten people in it; have all of these people stopped using the thing? The presence of a development version on CPAN dating from 2011 seems like a bit of tumbleweed blowing through this ghost town.
This module is very simple to use, and it is very helpful for finding memory errors in XS modules.
Just for example, here is one error I found with it:
With a C program one could usually test with
and look at the results, but with a Perl script, that becomes very convoluted because Perl usually exits without cleaning up its memory.
This module takes care of the Perl cleanup using Perl::Destruct::Level, and leaves the user with a nice and tidy output in TAP format which can be used to swiftly find memory leaks and other faults.
I think this is a very useful contribution.
The module does not work anymore, see rt.cpan.org/Ticket/Display.html?id=61121
Probably a victim of another deprecated Google API.
Perhaps there are some edge cases which aren't covered by this, but this module is definitely good enough for almost all of the times you need to read some piece of text in from a file without all the "local $/", "while (<>)", and other kinds of tedious things.
It works correctly, and it can save you a small amount of time, a small amount of reduplication, and a small headache if you need to convert, say, "pos($x)" into a line number in a piece of text.
Since this is essentially md5(dump($data)), why restrict yourself to hash? This works also for any kind of Perl data structure.
just installed the new version of ActivePerl 18.104.22.1682 64 bit
and i installed PAR::Packer module and when run i got this error
C:\perlcode>pp -o print.exe print.pl
C:\Users\jon\AppData\Local\Temp\parlzcPb.exe: Perl lib version (5.24.1) doesn't match executable 'perl.exe' version (5.24.0) at C:/Perl64/lib/Config.pm line 62.
Compilation failed in require at C:/Perl64/lib/Errno.pm line 10.
BEGIN failed--compilation aborted at C:/Perl64/lib/Errno.pm line 10.
Compilation failed in require at C:/Perl64/lib/File/Temp.pm line 17.
BEGIN failed--compilation aborted at C:/Perl64/lib/File/Temp.pm line 17.
Compilation failed in require at C:/Perl64/lib/Archive/Zip.pm line 11.
BEGIN failed--compilation aborted at C:/Perl64/lib/Archive/Zip.pm line 11.
Compilation failed in require at -e line 240.
C:\Perl64\site\bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'C:\Users\jon\AppData\Local\Temp\parl3swwQJc.exe' at C:/Perl64/site/lib/PAR/Packer.pm line 1184, <DATA> line 1.
This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x64-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2017, Larry Wall
Binary build 2402  provided by ActiveState www.ActiveState.com
Built Jan 5 2017 02:08:02
Great module if you OS/Environment does not meet the vendor provider SybaseASE.pm/so requirements.
Documentation was great and the installation was straightforward. Thanks!
This module is simple and very easy to use module.
If possible, I think that it is better for this author to publish this module to GitHub.
Everybody has said it already, but anyway, this is a huge improvement over the default CPAN client which comes with Perl.
The merit of this module is that App::cpanminus only tries to do one simple job, install a module for you, which is the only thing you really a cpan client to do, 99.999% of the time.