App-SD

 view release on metacpan or  search on metacpan

lib/App/SD/CLI/Command/Publish.pm  view on Meta::CPAN

            = grep { defined $element->attr($_) and $link eq $element->attr($_) }
            @{ $HTML::Tagset::linkElements{ $element->tag } };

        $element->attr( $attr, $url );
    }

    my @links;

    # we nned to turn every link into absolute, here is to find out dir info
    # e.g. if $current_url is '/foo/bar/baz.html', @dirs will be qw/foo bar/
    my @dirs = grep { $_ } split m{/}, $current_url;
    # pop the page name like history.html
    pop @dirs;

    for my $link ( keys %$all_links ) {
        next unless $link;

        # we don't use ./ and file: link in pages, so they are bogus for us
        # more worse thing is './' will overwride some page with nothing
        next if $link eq './' || $link =~ /^file:/;



( run in 0.746 second using v1.01-cache-2.11-cpan-71847e10f99 )