[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at dev.open-bio.org
Thu Jan 25 16:38:58 UTC 2007
mwilkinson
Thu Jan 25 11:38:58 EST 2007
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory dev.open-bio.org:/tmp/cvs-serv31120/MOBY/Client
Modified Files:
Central.pm
Log Message:
allow software using MOBY::Client::Central to declare its name as the User Agent such that we can keep track of it in the logs
moby-live/Perl/MOBY/Client Central.pm,1.137,1.138
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2006/12/14 17:57:06 1.137
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2007/01/25 16:38:58 1.138
@@ -90,7 +90,8 @@
MOBY_URI (default http://mobycentral.cbr.nrc.ca/MOBY/Central)
MOBY_PROXY (no default)
- Args : Registries - optional.
+ Args : user_agent - optional. The name of your software application
+ Registries - optional.
- takes the form
{$NAME1 => {
URL => $URL,
@@ -152,6 +153,8 @@
default_MOBY_type => [ 'soap', 'read/write' ],
Registries => [ undef, 'read/write' ],
multiple_registries => [ undef, 'read/write' ],
+ user_agent => [ "MOBY-Client-Central", 'read/write'],
+
# SWITCH TO THESE FOR A LOCAL MOBY CENTRAL REGISTRY
#default_MOBY_server => ['http://localhost/cgi-bin/MOBY-Central.pl', 'read/write'],
@@ -217,6 +220,7 @@
#print STDERR "executing CGI call\n";
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
+ $ua->agent($self->user_agent);
use CGI;
$param =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;
my $paramstring = "?action=$method";
More information about the MOBY-guts
mailing list