Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Memory Leak HTML::FormatText

by PerlNovice999 (Novice)
on Sep 16, 2013 at 09:23 UTC ( [id://1054262]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Memory Leak HTML::FormatText
in thread Memory Leak HTML::FormatText

The following code (adding the delete command in the eval call) works (no error message: "can't call method..."), but there is still a memory leak.

use warnings; use strict; use diagnostics; use HTML::FormatText; use HTML::TreeBuilder 5 - weak; use constant HAS_LEAKTRACE => eval{ require Test::LeakTrace }; use Test::More HAS_LEAKTRACE ? (tests => 1) : (skip_all => 'require Te +st::LeakTrace'); use Test::LeakTrace; leaks_cmp_ok{ open INPUT, "< D:/websiteadresses.txt" or die "Problem: $!"; # The file contains the adresses of 28 000 websites my @INPUT=<INPUT>; close INPUT; while (@INPUT) { my $input=shift(@INPUT); #my $proposal; chomp $input; print $input; my $content=HTML::FormatText->format_file($input, leftmargin => 0, ri +ghtmargin => 50); eval { $content->delete; }; # followed by regular expressions, the results of which are saved in +a different file - all now disabled } } '<', 1;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1054262]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-23 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found