in reply to Re^4: Some Weird behavior with BerkeleyDB and WWW::Mechanize
in thread Some Weird behavior with BerkeleyDB and WWW::Mechanize

I seriously doubt that.

If you look at sub get in Mechanize.pm:

sub get { my $self = shift; my $uri = shift; ...

The parameter $uri is passed by value, which means it is copied.

Even it is modified later on, you'll never see that in your script because it's just a copy that's modified.

However the uninitialized value might be a hint. Check $url for definedness, and die if it's not, then rerun your script.

Replies are listed 'Best First'.
Re^6: Some Weird behavior with BerkeleyDB and WWW::Mechanize
by downer (Monk) on Dec 06, 2007 at 00:17 UTC
    $url is defined and still generates this error... I dont understand why, I even get a error with LWP::Simple. this is an example of a key | value printed from the exact code posted above, a value that creates that weird error:
    $key: --Bwmk_a61s $value: www.youtube.com/watch?v=--Bwmk_a61s Camouflage en Santiago 2 +007/12/04 22:49:19 Suanmorket
    so the $url is www.youtube.com/watch?v=--Bwmk_a61s

    i checked, if i add a http:// to the front of the urls, I still encounter the same problems. weird!
      use warnings; and not -w and you can avoid such harmless warnings