Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    CGI::Enurl 1.08

    Download button

    No screenshots available
    Downloads: 434  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jan Krynicky | More programs
    Perl Artistic License / FREE
    July 19th, 2007, 10:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CGI::Enurl description

    A Perl module for URL-encoding strings and hashes.

    CGI::Enurl.pm is a Perl module for URL-encoding strings and hashes.

    SYNOPSIS

    use CGI::Enurl;
    %hash = (name=>'Jenda Krynicky',address=>'Nerudova 1016');
    print "Location: http://$ENV{SERVER_NAME}/cgi-bin/do.pl?",enurl %hash,"nn";


    This is a little module made for CGI scripting. It encodes the parameters to be passed to a CGI. It does nothing more, so it's much smaller and loads more quickly.

    Functions

    enurl STRING
    enurl ARRAY
    enurl HASH

    Encodes the parameter. If the parameter is a single string it encodes it and returns the encoded form.

    If it is an array or a reference to an array it encodes all items and returns them joined by '&'.

    If it is a hash it encodes the values and return a querystring in form "key2=encoded_value1&key2=encoded_value2&...".

    !!! Please note that a hash in a list context returns a list of all keys and values. This means that if you call enurl(%hash) you will NOT get what you may thing you should. You HAVE to use enurl(%hash) !!!

    enURL STRING

    Encodes the parameter, this version doesn't encode '=' and '&' characters, so you should make sure they are not present in the data.

    Notice the difference :

    enurl 'a&b=f o o' => 'a&b=f+o+o'
    enURL 'a&b=f o o' => 'a&b=f+o+o'

    $CGI::Enurl::ParamSeparator

    You may specify another character to be used as the parameter separator. Simply set this variable to the character (or string) you want to use.
    The default value is '&'

    $CGI::Enurl::KeepUnencoded

    This variable contains the characters that should stay unencoded. Please keep in mind that the string will be interpolated into a regexp in a [^...] group!

    Any change of this variable will be ignored after the first call to enurl or enURL. (I'm using /o switch in the regexp.) So if you want to change the variable you should do it as soon as posible. You may do that even before you "use" the module!

    The default value is 'a-zA-Z 0-9_\-@.='


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    URL-encoding strings | URL-encoding hashes | Perl module | CGI | URL-encoding | strings

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM