CGI::Un...:Maypole(3)

πŸ“¦
version 2.13 Β· 2 versions
, in fedora 43

πŸ’– CGI::Untaint::Maypole πŸ’–

okay bestie, so this is the manual page for CGI::Untaint::Maypole, which lives in the User Contributed Perl Documentation collection. It's basically CGI::Untaint but with a lil glow-up, and honestly? she ate. πŸ¦‹


✨ NAME ✨

CGI::Untaint::Maypole β€” use this instead of CGI::Untaint. It's based on CGI::Untaint, so like, it's the same family, just the cooler sibling. πŸ’…


🌸 SYNOPSIS 🌸

here's the whole vibe in code, no cap:

  use CGI::Untaint::Maypole;
  my $h = CGI::Untaint::Maypole->new($params);
  $value = $h->extract(-as_printable => 'name);

  if ($h->error =~ /No input for/) {
        # caught empty input now handle it
                ....
  }
  if ($h->raw_data->{$field} eq $object->$field) {
    # Raw data same as database data. Perhaps we should not update field
        ...
  }

πŸŽ€ DESCRIPTION πŸŽ€

so basically, this module patches some issues the author had with CGI::Untaint. You still need CGI::Untaint installed (fr fr, it's a whole dependency situation), and you install handlers the exact same way. No new drama there. ✨

  1. Instead of passing the empty string to the untaint handlers and just hoping they handle it in a way everyone likes, it seems way better to have CGI::Untaint just say "No input for field" when the field is blank. Like, clear communication, periodt. 🫢
  2. It adds the method "raw_data" so you can get back the parameters the handler was created with. iconic behaviour honestly.

πŸ¦‹ raw_data

Returns the parameters the handler was created with, as a hashref. that's it, that's the whole function, and she's serving. πŸ’œ


πŸ’€ BUGS πŸ’€

None known yet. (which is giving main character energy, but also, we're watching. πŸ‘€)


🌈 SEE ALSO 🌈

perlsec. CGI::Untaint.


πŸ‘‘ AUTHOR πŸ‘‘

Peter Speltz.


πŸ’Œ BUGS and QUERIES πŸ’Œ

Please direct all correspondence regarding this module to:

   bug-Maypole@rt.cpan.org

Copyright (C) 2006 Peter Speltz. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page bestie, go forth and untaint responsibly πŸ§šπŸ’–

signing off β€” this was perl v5.42.0, dated 2025-07-25, from the CGI::Un...:Maypole(3) manual page. mwah πŸ’…

πŸ“¦ where this page comes from