]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- make urls unique in perl already, 1m win for media info
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 5 Oct 2010 11:09:50 +0000 (11:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pldnotify.awk -> 1.95

pldnotify.awk

index 70fa742b6e65e2dddba2dc720e092aabad6042be..9085c6f8f04d2b9ae20479945f63f2e9be8a503f 100644 (file)
@@ -200,10 +200,14 @@ function extract_links_cmd(tmpfile) {
        my $content = join q//, <>; \
        my $root = new HTML::TreeBuilder; \
        $root->parse($content); \
-       my $links_r = $root->extract_links(); \
        \
+       my %links = (); \
        for (@{$root->extract_links(qw(a iframe))}) { \
                my($link, $element, $attr, $tag) = @$_; \
+               $links{$link} = $tag; \
+       } \
+       \
+       while (my($link, $tag) = each %links) { \
                print $tag, q/ /, $link, $/; \
        } \
        ' " tmpfile
This page took 0.033949 seconds and 4 git commands to generate.