jerrygarciuh has asked for the
wisdom of the Perl Monks concerning the following question:

Esteemed monks,

I am attempting to learn WWW::Mechanize in order to avoid paying for API access from a large financial institution. If my app can access their web interface securely then the API is unneccessary. The modules in libwww-perl and HTTP::Headers etc are fresh from CPAN. My sample code:

jg_____________________________________________________"The man who grasps principles can successfully
select his own methods.The man who tries methods,
ignoring principles, is sure to have trouble.~ Ralph Waldo Emerson

Thanks for the reply but as I mention in my post I have the latest versions and in fact included the source from Headers.pm for the method remove_content_headers() in my question.
jg

TIAjg_____________________________________________________"The man who grasps principles can successfully
select his own methods.The man who tries methods,
ignoring principles, is sure to have trouble.~ Ralph Waldo Emerson

Before you go too much further, you might want to check the terms of service with your financial institution. They may have a clause that prohibits such things. (The usual reason for such a clause is to insure proper revenue for the API.)

If the institution in question provides a web application (and they do) for me to run reports as a person with a browser, why on earth would it be illegal for me to access the service and do the same reports via an automaton? I am time impaired, so I am making a 'screen reader' which not only reads the reports but updates my database every quarter hour. As paulbort points out there may be a clause denying me this access but in my view I am merely automating the manner in which I already am allowed to avail myself of the reports.

Peace,

jg_____________________________________________________"The man who grasps principles can successfully
select his own methods.The man who tries methods,
ignoring principles, is sure to have trouble.~ Ralph Waldo Emerson

The medium via which information is presented is an integral component of any contract. For example, if a content provider provides you with content without a fee, then it probably has a revenue model that involves some secondary effect of you viewing the content, e.g. advertisement viewing. If you bypass their system and extract the information you want directly, in a way that violates your contract, then you are depriving them of their revenue. No matter how you slice it, taking something without authorization from someone is stealing. Furthermore, via your automation you may be harming them via resource over-taxing. There are very good reasons for prohibiting "robots" from accessing web sites, and your selfish disregard for them invites a Tragedy of the Commons.

There is plenty of precedent for content/service providers going after people who violate the terms of their service agreement. Don't take my word for it though... Just ask some of the people who have been taken to court by eBay.

Whoa, Nellie. It's not necessarily illegal. AFAIK, it would not be illegal to use WWW::Mechanize to pull a copy of the PM front page every five minutes. But if one has an agreement with a financial services institution, and that agreement prohibited any use of their web site other than access personally and immediately directed by the authorized user, this could be a violation of that agreement. They have a habit of writing terms into their agreements that are to their advantage, rather than their clients' advantage. Said institution could include in its terms such a prohibition, and the penalty the institution could levy for a violation, but unless there is a specific law being broken, we're talking about breach of contract, rather than criminal charges.

_____________________________________________________"The man who grasps principles can successfully
select his own methods.The man who tries methods,
ignoring principles, is sure to have trouble.~ Ralph Waldo Emerson

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other