Hi Kieren,

Great idea. I've just applied for a CPAN account, and I will upload the code
there when we get the account.

- Ian

Subject: Re: [Connotea-code-devel] perl api -- modifications

Can you push a version to CPAN as well to improve the visibility of
the connotea project please.  Tell me to jfdi and i'll push a copy to
cpan using my username (ZARQUON fwiw).

Kieren

On 13/10/2007, Martin Flack <[EMAIL PROTECTED]> wrote:
> Hi Philip,
>
> Thanks for this. I think the Java and Ruby libraries have been getting
> more attention so we must have missed these issues. I've prepared a new
> tarball labeled 0.1.1 which will go up on Sourceforge soon.
>
> Martin
>
> Philip Bett wrote:
> > Hi all,
> > I've had to make a couple of modifications to my copy of Connotea.pm in
> > www-connotea-perl-0.1 in order to get it to work -- I thought I'd post
> > them here in case others found them useful. (apologies if they're known
> > issues, but they are still in the downloadable code)
> >
> >
> > (1) Using a proxy:
> > Working from a university means all web traffic has to go via a proxy
> > server.
> >
> > I had to add a line to the sub 'new' in Connotea.pm:
> > ...
> > $ua = LWP::UserAgent->new;                   ## Existing line...
> > $ua->env_proxy;                              ## New line!
> > $ua->agent(UA_PREFIX.' ('.$ua->agent.')');   ## Existing line...
> > ...
> >
> > Simple enough.
> >
> >
> > (2) Parsing the response:
> > This is a bit more serious.  The sub 'parse_body' is set to croak if the
> > returned content-type isn't on a list of allowed values.  This list
> > includes "application/xml", but the actual response gives a content-type
> > of "application/xml; charset=UTF-8", so it will always croak.
> >
> > My solution is to split the returned string at the first semicolon, and
> > just take the first chunk:
> >
> > @conttypes = split( /([;])/, $response->header('Content-type'), );
> > $conttype  = $conttypes[0];
> > croak "Invalid content type in response: $conttype\n" unless
> > $rdf_content_types{$conttype};
> >
> > (original line was:
> > croak 'Invalid content type in response:
> > "'.$response->header('Content-type').'"' unless
> > $rdf_content_types{$response->header('Content-type')};
> > )
> >
> >
> > These solutions are, I'm sure, not the most efficient, elegant or
> > robust, but that's about the limit of my perl skills at the moment!  I'd
> > like to hear how these could be improved, or if anyone knows of any
> > similar pitfalls I might encounter.
> >
> >
> > Cheers,
> > Phil Bett
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Connotea-code-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/connotea-code-devel
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Connotea-code-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/connotea-code-devel
>

********************************************************************************
   
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and 
attachments (if any). No contracts may be concluded on behalf of Macmillan 
Publishers Limited or its agents by means of e-mail communication. Macmillan 
Publishers Limited Registered in England and Wales with registered number 
785998 
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS   
********************************************************************************

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Connotea-code-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/connotea-code-devel

Reply via email to