Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

perltidy and perlcritic web service

by eltrab (Novice)
on Oct 10, 2007 at 15:29 UTC ( #643986=CUFP: print w/ replies, xml ) Need Help??

Sometimes, you just can't install Perl::Tidy or Perl::Critic on a server but you really want to leverage them.

These web services accept your code as input and can be invoked from the command line or from within your favorite text editor (vim examples provided).

Please read the documentation for each tool at my website. perlster.com

Examples (for the impatient)

The examples assume that you have LWP (lib www perl) installed.

command line examples:
lwp-request -m POST http://perlster.com/tools/perlcritic/service.pl < +your_code lwp-request -m POST http://perlster.com/tools/perltidy/service.pl < yo +ur_code
vim (.vimrc) examples:
map <F5> :! lwp-request -m POST http://perlster.com/tools/perlcritic/s +ervice.pl < %<CR> map <F4> :%! lwp-request -m POST http://perlster.com/tools/perltidy/se +rvice.pl<CR>

perlcritic webservice already exists right?

I understand that a web service for perlcritic already exists -- please read my explanation in the documentation.

Comment on perltidy and perlcritic web service
Select or Download Code
Re: perltidy and perlcritic web service
by jthalhammer (Friar) on Oct 19, 2007 at 04:56 UTC
    That's cool. If you ever want to bring some of your ideas to the perlcritic.com site, then you're welcome to hack on the source. Here's how to checkout the code from the repository:

    svn checkout http://perlcritic.tigris.org/svn/perlcritic/trunk/perlcritic.com --username guest --password ''

    Let me know if you want a commit bit.

    -Jeff

      Thanks for the tip Jeff. I'll definitely take a look when I get a chance. No sense diverging in two different directions on a tool such as this.
Re: perltidy and perlcritic web service
by elwarren (Curate) on Oct 29, 2007 at 15:56 UTC
    Is this code available for us to dl?

    Running this webservice locally could be a nice alternative for people working in strange environments. For example windows compiled vim and cygwin compiled perl.

      I'm all for opening up the code. I will link up a download once I've cleaned up the documentation for the cgi's.

      However, if you want to run it locally, you might as well just use the 'perltidy' and 'perlcritic' command line utilities that come with their respective cpan modules instead of calling out to a web service if you're going to run it locally.

      I do understand potential privacy concerns that people may have in using my webservice (though I assure you I'm not logging any code submitted) and so I could see that having an private 'perl tools' web service machine running these scripts would be preferable for some (or many?).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://643986]
Approved by grep
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-09-24 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (245 votes), past polls