in reply to Re^6: XML tags using perl CGI
in thread XML tags using perl CGI

Although I do wish there was a simple module to decode query parameters that isn't part of a framework

No need to wish, since it already exists: CGI::Simple -- it gives an interface to the CGI parameters that would be familiar to ex-users of CGI.pm without any of the hacky HTML generation cruft.

Replies are listed 'Best First'.
Re^8: XML tags using perl CGI
by Bod (Parson) on Jan 14, 2024 at 20:30 UTC
    No need to wish, since it already exists: CGI::Simple

    Oh! That's helpful thanks...

    I shall have to look into this further. Currently, I use a module I have written and used for a very long time. It exports two hashes: %data that holds the query key/value pairs. Also, %file, is a strange two-dimensional hash holding both the file data and the filename for named upload files. This was written before I understood references so it could do with changing or replacing but I've got so used to writing for this module that it's become muscle memory...

      There are a few low-fat CGI modules and one or other is probably preferable compared with CGI.pm these days. Consider CGI::Minimal, CGI::Lite and CGI::Thin in addition to the aforementioned CGI::Simple if you need that functionality without the legacy overhead. CGI::Minimal even has a nice (if outdated) performance comparison table in the Performance Hints section.


      🦛