Module submission: REV

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Module submission: REV

    Hi,

    I've written a mini programming language called REV for data
    validation. REV stands for Really Easy Validation - and is a language
    similar to Perl that can be compiled to Perl, PHP, and JavaScript.
    (with more languages on the way) The idea is to write validation code
    only once and then compile it to JavaScript and to your server side
    language. The language itself is pretty powerful. For example:

    error("Please specify a username") if empty <username>;
    error("Please specify a valid email address") unless @ <email>;

    These are the most basic types of statements - they check a given form
    field (variables in <>) for a specific condition - if it is empty or if
    it is an email (the @ operator). Lots of other data type checks are
    available. You can also create temporary variables and use constructs
    like loops. Consider a form that uses JavaScript to allow you to add
    many email addresses to a mailing list. (i.e. you can click on 'Add
    Another Address' and you get another text box) Then, assuming your
    JavaScript keeps updating a form field called 'maxIndex' you can use
    the following code for validation:

    error("Please specify at least one email address"0 unless <maxIndex> >
    0;
    for i ( 1..<maxIndex> ) {
    error("Please specify a valid email address in box #" _ i) unless @
    <email${i}>
    }

    The compiler is written in Perl and I would like to register the
    namespace REV for this module - but of couse I understand the
    difficulties involved with top level namespaces. Does anyone object to
    this namespace? Or suggest a different one? I'd also like to register
    Template::Plugin::REV for generation of JavaScript validation functions
    using Text::Template.

    For more information you also might visit
    rev-validation.sourceforge.net - the current source code is there as
    well.

    Thanks,
    Robby

    Robby Walker Guest

  2. Similar Questions and Discussions

    1. Module Submission: Regexp::MultiLanguage
      I'm working on a project where I need to use a set of common regular expressions in more than one programming language. To facilitate this, I've...
    2. Submission Form?
      Hi, I am trying to create a submission form that, after hitting the "submit" button, is automatically sent to a specified e-mail address. I tried...
    3. Submission Pages
      Hi, does anyone know of any tutorials on how to create submission pages? I want to create a page where a user can enter their details and upload...
    4. Free Submission
      Hi, I'm looking free free submission to Russian searchengines. Can you help me. Thanx in advance. -- www.selentia.de
    5. Submission of reproducable bug
      Could I get a response possibly from the MS team as to the best way to report a reproducable bug? I have as simple form which can be reproduced...
  3. #2

    Default Re: Module submission: REV

    > error("Please specify at least one email address"0 unless <maxIndex> >
    > 0;
    > for i ( 1..<maxIndex> ) {
    > error("Please specify a valid email address in box #" _ i) unless @
    > <email${i}>
    > }
    Please forgive my typo here - the first line should read

    error("Please specify at least one email address") unless <maxIndex> >
    0;

    Thanks again,
    Robby

    Robby Walker Guest

  4. #3

    Default Re: Module submission: REV

    "Robby Walker" <robby.walker@gmail.com> writes:
    > The compiler is written in Perl and I would like to register the
    > namespace REV for this module - but of couse I understand the
    > difficulties involved with top level namespaces. Does anyone object to
    > this namespace? Or suggest a different one?
    How about Compiler::REV?
    > I'd also like to register
    > Template::Plugin::REV for generation of JavaScript validation functions
    > using Text::Template.
    That sounds about right to me.

    sherm--

    --
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Hire me! My resume: [url]http://www.dot-app.org[/url]
    Sherm Pendley Guest

  5. #4

    Default Re: Module submission: REV


    Sherm Pendley wrote:
    > "Robby Walker" <robby.walker@gmail.com> writes:
    >
    > > The compiler is written in Perl and I would like to register the
    > > namespace REV for this module - but of couse I understand the
    > > difficulties involved with top level namespaces. Does anyone object to
    > > this namespace? Or suggest a different one?
    >
    > How about Compiler::REV?
    I like Compiler::REV - although there don't appear to be other
    Compiler::* modules. So that would be a new root level suggestion too!
    In fact, the only things I've seen have been the PHP and JavaScript
    root level namespaces - hence my original choice. Thoughts?

    Thanks!

    - Robby

    Robby Walker Guest

  6. #5

    Default Re: Module submission: REV

    Robby Walker wrote:
    > Sherm Pendley wrote:
    >
    >>"Robby Walker" <robby.walker@gmail.com> writes:
    >>
    >>
    >>>The compiler is written in Perl and I would like to register the
    >>>namespace REV for this module - but of couse I understand the
    >>>difficulties involved with top level namespaces. Does anyone object to
    >>>this namespace? Or suggest a different one?
    >>
    >>How about Compiler::REV?
    >
    >
    > I like Compiler::REV - although there don't appear to be other
    > Compiler::* modules. So that would be a new root level suggestion too!
    > In fact, the only things I've seen have been the PHP and JavaScript
    > root level namespaces - hence my original choice. Thoughts?
    >
    > Thanks!
    >
    > - Robby
    >
    What about the Language:: namespace? It appears to contain Basic and
    Haskell, as well as less-serious entries such as Brainf**k and Ook.

    I have never tried to establish a top-level namespace. Once upon a time
    you had to jump through hoops to get any kind of namespace registered,
    but it seems to be easier now.

    Tom Wyant
    harryfmudd [AT] comcast [DOT] net Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139