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

Re^5: saveResources_future and tab in WWW::Mechanize::Chrome

by Corion (Patriarch)
on May 13, 2020 at 12:38 UTC ( [id://11116757]=note: print w/replies, xml ) Need Help??


in reply to Re^4: saveResources_future and tab in WWW::Mechanize::Chrome
in thread saveResources_future and tab in WWW::Mechanize::Chrome

No, that's the part that works.

The part that fails is in ub fetchResources_future, which doesn't respect any base directory at all currently. There, more or less the same thing has to happen:

... my $duplicates; my $old_target = $target; while( $filenames{ $target }) { $duplicates++; ( $target = $old_target )=~ s!\.(\w+)$!_$duplicates.$ +1!; }; - $names->{ $res->{url} } = $target; + $names->{ $res->{url} } = File::Spec->catfile( $base_dir, + $target ); };

Replies are listed 'Best First'.
Re^6: saveResources_future and tab in WWW::Mechanize::Chrome
by 1nelly1 (Sexton) on May 13, 2020 at 18:20 UTC

    Ok. I see. Thank you for these insights.
    And many thanks for your quick help.
    Best regards
    1nelly1

      Sorry to bother you again. I installed the update. Now in %names only one uri and no printing at all in sub saveResources_future.
      Best regards
      1nelly1

        saveResources_future now follows its documentation and returns a hashref where it previously returned a hash.

        Also, the printing was an error and is now eliminated.

        If you can show a bit code then maybe I can see how to improve your code or what to change to make it behave as you want?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-24 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found