http://qs321.pair.com?node_id=572590


in reply to Looking for REST equivalent to WWW::Mechanize

I find this post confusing. I understand REST to be centered around clean URLs. In that case, maybe CGI::Application::Dispatch is what you are looking for. It works well for me. You mentioned delivering XML, but that's not technically part of REST.

On the other hand, WWW::Mechanize should have little trouble retrieving XML. Your application just needs to serve it.

It would be helpful to see some more concrete examples or description of the problem you are running into.

  • Comment on Re: Looking for REST equivalent to WWW::Mechanize

Replies are listed 'Best First'.
Re^2: Looking for REST equivalent to WWW::Mechanize
by talexb (Chancellor) on Sep 12, 2006 at 20:31 UTC

    It may be that my post is confusing .. I'm still trying to understand how it all works, and what tools to use from CPAN.

    I'm working from the REST definition in the REST article:

      REST strictly refers to a collection of architectural principles (described below). The term is also often used in a looser sense to describe any simple interface that uses XML (or YAML, JSON, plain text) over HTTP without an additional messaging layer such as SOAP.
    I'm trying to emit XML in response to clean URLs with a view towards providing a simple interface for the web application that I'm writing.

    My plan is that I'll provide clients with Perl or shell scripts to upload/download files, without having to worry about providing something that needs to parse XHTML web pages -- instead, they'll be able to talk XML, which will be strictly data, no ornamentation. This is a follow-on to my previous post on the same topic.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re^2: Looking for REST equivalent to WWW::Mechanize
by talexb (Chancellor) on Sep 13, 2006 at 20:47 UTC

    After fiddling a bit with XML, I decided to take an easier approach, and decided to use YAML instead of XML. I now have a working test suite that tests against both the XHTML and the REST/YAML interfaces, using the same test data. I ended up just using LWP::UserAgent for that -- WWW::Mechanize wasn't necessary for testing of the REST/YAML side.

    And I need to thank you for that -- you stated that XML wasn't necessarily part of REST, and you're right. Once again, Perlmonks provides great feedback, something that I rely on, since I'm the only Perl developer at my employer who is focussing on the web.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds