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

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.

Examples (for the impatient)

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

command line examples:
lwp-request -m POST < +your_code lwp-request -m POST < yo +ur_code
vim (.vimrc) examples:
map <F5> :! lwp-request -m POST < %<CR> map <F4> :%! lwp-request -m POST<CR>

perlcritic webservice already exists right?

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

Replies are listed 'Best First'.
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 site, then you're welcome to hack on the source. Here's how to checkout the code from the repository:

    svn checkout --username guest --password ''

    Let me know if you want a commit bit.


      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://643986]
Approved by grep
and the monks are mute...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2018-05-26 04:24 GMT
Find Nodes?
    Voting Booth?