tion will be enough to investigate the warnings, but
I can try to make a small test case if it's wanted.
--
Ed Avis <[EMAIL PROTECTED]>
Agent that forces requests to
GET (and, ideally, then prints out the URI being used).
--
Ed Avis <[EMAIL PROTECTED]>
Jacinta Richardson <[EMAIL PROTECTED]> writes:
>Ed Avis appears to be asking for the LWP::Simple functions to die on
>failure rather than return a false value. The advantage to this method
>is that instead of writing:
>
>do_this() or die "can't do_this...&q
have to explicitly ignore or catch errors if you
want to do that. The patch with the global $LWP::Simple::err was only
because I thought it stood a better chance of getting accepted that
way.
--
Ed Avis <[EMAIL PROTECTED]>
$! variable.
>Global variables are bad programing!!!
It is worse programming IMHO to just report 'operation failed' without
giving any details of how or why.
--
Ed Avis <[EMAIL PROTECTED]>
kes it simple to do the right thing, which
in my opinion means always checking the success of each call and
giving an informative error message.
Might you include such a library (with interface similar to
LWP::Simple) in the LWP bundle, or should I distribute it separately?
--
Ed Avis <[EMAIL PROTECTED]>
nless defined $content;
+ die "Couldn't get it: $LWP::Simple::error" unless defined $content;
if (mirror("http://www.sn.no/";, "foo") == RC_NOT_MODIFIED) {
...
@@ -325,6 +359,9 @@
=back
+If the last call to an LWP::Simple function failed then
+C<$LWP::Simple::error> contains an error message.
+
The module will also export the LWP::UserAgent object as C<$ua> if you
ask for it explicitly.
--
Ed Avis <[EMAIL PROTECTED]>
under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your b
TOH, if get() threw an exception it would be able to include a
helpful error message - bad URL syntax? couldn't resolve hostname?
404 not found? - much better than a bare 'undef'. But this would
happen without the programmer having to do anything special. In
other words, I am concerned to make it easy to do the right thing.
--
Ed Avis <[EMAIL PROTECTED]>
od idea? Should I send a patch?
--
Ed Avis <[EMAIL PROTECTED]>
laces for text data to
get converted it's hard to know which to blame... I'm really not used
to Windows programming :-P.
Thanks for the tip.
--
Ed Avis <[EMAIL PROTECTED]>
nt is treated as text (rather than
binary) so line endings and the like may be converted.
I hope that you can make these two documentation changes.
--
Ed Avis <[EMAIL PROTECTED]>
ransfer mode for ftp, but uses
ASCII mode if the "type=a" parameter is in the URL.
I just grepped for 'binary' in the LWP docs, which explains why I
didn't find anything :-P.
--
Ed Avis <[EMAIL PROTECTED]>
LWP::Simple is able to get ftp:// URLs. But the pod documentation
doesn't say whether it uses binary or ASCII transfer mode. I'm not
sure of the best place to document that, but it needs to be documented
somewhere that you could find starting from the LWP::Simple docs.
--
Ed Av
pod documentation uses that name) it still seems more
sensible for the package to be named that. But whatever.
--
Ed Avis <[EMAIL PROTECTED]>
It is strange that the HTML-Tree-3.17 package does not contain any
module named HTML::Tree, or even any module under the HTML::Tree
namespace. Perhaps it would be better given a 'bundle' name, or maybe
HTML::TreeBuilder could be renamed to HTML::Tree::Builder, etc.
--
Ed Avis <[EMAIL PROTECTED]>
in two, with the
methods like visit() in a separate class? Or that code should move
into LWP::RobotUA, which is the only thing using it? Or maybe I have
misunderstood the purpose of the WWW::RobotRules class.
--
Ed Avis <[EMAIL PROTECTED]>
h(@guess, "www.$host.$MY_COUNTRY");
+ push(@guess, 'www.$host.' . MY_COUNTRY());
}
}
push(@guess, map "www.$host.$_",
--
Ed Avis <[EMAIL PROTECTED]>
ere is saying
'perl -MURI::Heuristic -e 'print "$URI::Heuristic::VERSION\n"'. But I
can imagine an interactive program using this module which hangs on
startup.)
--
Ed Avis <[EMAIL PROTECTED]>
19 matches
Mail list logo