home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / SuperPython.pm < prev    next >
Encoding:
Perl POD Document  |  2001-07-17  |  1.5 KB  |  65 lines

  1. #
  2. # SuperPython.pm
  3. #
  4. # 20010401 M J Dominus (mjd@plover.com)
  5. #
  6.  
  7. =head1 NAME
  8.  
  9. SuperPython - Perl filter module to implement the SuperPython language
  10.  
  11. =head1 SYNOPSIS
  12.  
  13.   perl -MSuperPython hello.spy
  14.  
  15.   use SuperPython;
  16.   # (SuperPython code follows here)
  17.   no SuperPython;
  18.   # regular Perl code resumes
  19.   # (not recommended; regular Perl is too hard to understand and maintain)
  20.  
  21. =head1 DESCRIPTION
  22.  
  23. This module implements a Perl source filter for the SuperPython
  24. language, allowing SuperPython code to be embedded into Perl programs.
  25.  
  26. SuperPython brings to Perl all the benefits of Python's vaunted
  27. whitespace-sensitivity, including readability, maintainability, less
  28. punctuation, and all that other great crap.  In fact, it goes several
  29. steps further than Python in this direction.  However, SuperPython
  30. retains Perl's powerful and flexible underlying semantics.
  31.  
  32. Example SuperPython programs (C<*.spy>) are included with this module.
  33. The syntax should be clear even to a casual observer; however, watch
  34. out for the upcoming 'SuperPython in a Nutshell' book from O'Reilly
  35. and Associates.
  36.  
  37. =head1 FUTURE WORK
  38.  
  39. There is no reason why Python itself could not take advantage of the
  40. benefits of SuperPython's improved syntax.  I look forward to working
  41. with the Python community to port this module to work with Python.
  42.  
  43. =head1 AUTHOR
  44.  
  45. Mark Jason Dominus (mjd@plover.com)
  46.  
  47. =head1 SEE ALSO
  48.  
  49. python(1).
  50.  
  51. =cut
  52.  
  53. package SuperPython;
  54.  
  55. $VERSION = 0.91;
  56.  
  57. use Filter::Simple sub 
  58. {
  59.     s/( *)    /chr(length($1))/ge;
  60. };
  61.  
  62. 1;
  63.  
  64.  
  65.