Acme-Addslashes
view release on metacpan or search on metacpan
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
lib/Acme/Addslashes.pm view on Meta::CPAN
Letters, numbers, punctuation, whitespace, unicode symbols.
You name it, this function can add a slash to it.
Will return you a C<utf8> encoded string containing your original string, but with
enough slashes added to make Freddy Krueger jealous.
=cut
# The addslashes function. It is documented above. -- JAITKEN
sub addslashes {
# Get the arguments passed to the function using the shift command -- JAITKEN
my $unsafe_string = shift;
# Split the string into letters - just like explode in PHP. Or maybe str_split
# I can't remember which one is which -- JAITKEN
my @unsafe_array = split('', $unsafe_string);
# Add slashes to every character thanks to unicode.
# This is complex magic -- JAITKEN
# I think these slashes could be longer -- SKINGTON
# You forgot the last slash -- JAITKEN
( run in 1.178 second using v1.01-cache-2.11-cpan-f56aa216473 )