You are here: TWiki> Plugins Web>PerlSamplePlugin (2008-12-12, SopanShewale)
Tags:
development1Add my vote for this tag create new tag
, view all tags
+++ Perl examples Plugin

[ move all devel chit chat to PerlSamplePluginDev ]

This plugin nicely formats a Perl piece of code, together with its STDOUT and STDERR outputs.

  • To avoid unproper usage it executes the Perl code in a Safe compartment.

His brother is the TWiki:Main.PrologSamplePlugin

TODO:

  • Apply a timeout to the perl execution (spawn a delayed kill process)
  • Limit the output size (disk quota?)
  • Use a random generated file for the output/stderr

Usage example

You type: You get: If correctly installed:
 
%PERLSAMPLE{ 
print "hello world!"; 
}%  
code return
1
print "hello world!";
stdout stderr
 1: hello world! 
 
%PERLSAMPLE{print "hello world!";}%

Settings

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = This plugin nicely formats a Perl piece of code, together with its STDOUT and STDERR outputs.

Installation

  • Install the Safe Perl module (included since perl 5.005_04)
  • Unzip the PerlSamplePlugin.zip file in your TWiki installation directory.
  • double check that bin/perl_stdout.tmp and bin/perl_stderr.tmp are writable by the Apache user.

If the installation is correct you will see a nice table showing the code, its value and stdout/stderr near the example.

-- TWiki:Main.AndreaSterbini and TWiki:Main.FrancoBagnoli -- 27 Nov 2001

Topic attachments
I Attachment Action Size Date Who Comment
elsemd5 PerlSamplePlugin.md5 manage 0.2 K 2008-12-12 - 11:51 SopanShewale checksum file , Uploaded as a part of Release Process
ziptgz PerlSamplePlugin.tgz manage 3.7 K 2008-12-12 - 11:50 SopanShewale See PerlSamplePlugin for details. Untar and run the installer script, Uploaded as a part of Release Process
zipzip PerlSamplePlugin.zip manage 5.1 K 2008-12-12 - 11:50 SopanShewale See PerlSamplePlugin for details. Unzip and run the installer script , Uploaded as a part of Release Process
elseEXT PerlSamplePlugin_installer manage 3.4 K 2008-12-12 - 11:51 SopanShewale Installer Script, Uploaded as a part of Release Process
Topic revision: r8 - 2008-12-12 - 11:51:07 - SopanShewale
 
TWIKI.NET
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.