View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Julian Lishev > WebTools > webtools



Annotate this POD


New  1
Open  0
View/Report Bugs
Module Version: 1.27   Source  


webtools - Full featured WEB Development Tools (compare with Php language) in Perl syntax


This package is written in pure Perl and its main purpose is: to help all Web developers. It brings in self many features of modern Web developing:

  -  Grabs best of Php but in Perl syntax.
  -  Embedded Perl into HTML files.
  -  Buffered output.
  -  Easy reading input forms and cookies using global variables.
  -  Flat files database support.
  -  MySQL/MS Access support.
  -  Full Sessions support (via flat files or via DB)
  -  Easy User support (SignIn / SignUp)
  -  Cookies support.
  -  Attached variables.
  -  Html/SQL templates and variables.
  -  Mail functions (plain/html mails/uploads)
  -  Upload/download functions via Perl scripts.
  -  DES III encription/decription in MIME style
  and more...


 Follow example show session capabilities, when WebTools is configured with 
 Flat file session support(default):

    $sid = session_start();
    %h = read_hash('myhash');
    if($h{'city'} ne "Pleven")
       print "<B>New session started!</B>";
       %h = (city=>"Pleven",country=>"Bulgaria");
       $reg_data = register_var('hash','myhash',%h);
       # $reg_data .= register_var('scalar','scl_name',$cnt);
       # $reg_data .= register_var('array',''arrname',@arr);
       print "Current session is: <B>$sid</B> <BR> and registrated data are:<BR>";
       print "Country: <B>".$h{'country'}."</B><BR>";
       print "City: <B>".$h{'city'}."</B><BR>";
       print "Session Destroyed!";
    Header(type=>'content',val=>'text/html; charset=Windows-1251');
    # SURPRISE: We send header after html data??? (Is Php capable of this? ;-)
 Above code can be saved in 'htmls' directory under 'test.whtml' file name and you can
 run it in browser location with follow line:

 Code below show how easy is to send e-mails with WebTools
 (Don't forget to set $debug_mail = 'off' in
    require '';
    $to   = '';
    $from = '';
    $subject = 'Test';
    $body = 'Hello there!';
    $orginal_filename = $uploaded_original_file_names{'myupload'};
    # 'myupload' is name of input field in html form.
    $fn = $uploaded_files{'myupload'};
    print 'Mail sent!';

 Above code can be saved in 'htmls' directory under 'mail.whtml' file name and you can
 run it in browser location with follow line:
Specifications and examples
 Please read HELP.doc and see all examples in docs/examples directory
syntax highlighting: