zostay

Kansas

contentment.org

Age: 35

I live in Kansas and spend most my time with family, working, and avoiding yard work.

Apr
7
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
I asked how to handle a string exception. I wasn't and am still not concerned with how it originated. If you read more than that in to it, that wasn't what I intended to communicate.
Apr
7
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
It's my question. I didn't limit it to die.
Apr
3
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
I didn't limit the question to just exceptions thrown by die.
Apr
2
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
It's been awhile, but I did find another case. I just saw this line in a stack trace: "Moose::Object::new('TestBot', 'event_loop', 'Bot::Backbone::TestEventLoop') called at generated method (unknown origin) line 3".
Oct
1
awarded Supporter
Sep
26
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
My samples have been updated to be as dumb as I really meant them to be. I wasn't looking for the examples to distract from getting some answers.
Sep
26
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
Apparently, I should have posted my question without example code. I've simplified the examples to include something even dumber that does the job. I'm still trying to find examples without lines. Digging through all my old errors to find the one that led to that.
Sep
26
revised What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
simplifying my examples
Sep
26
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
I'm almost certain there are, but I can't find an example of it right now.
Sep
26
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
I usually throw exception objects based on Throwable or something similar in my own app code.
Sep
26
comment What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
Yes, but that doesn't help when it's something generated by some other code my app deals with.
Sep
26
asked What's a reliable way to sanitize a die string, removing the " at File.pm line 123"?
Sep
17
awarded Autobiographer
Sep
14
revised JSON::XS complains if a key is not quoted
added 83 characters in body
Sep
14
comment JSON::XS complains if a key is not quoted
You might try JSON::PP, it will have the same error by default but it has additional options.
Sep
14
answered JSON::XS complains if a key is not quoted
Sep
14
comment Perl parse url to get the value using
You really should accept the answers that solve your questions. A 0% accept rate is not so good.
Sep
14
comment CGI upload creates empty file
I'm not ignoring your problem itself, I have not yet noticed anything wrong with your program. Maybe you can check to make sure the temp file is being created with content via tmpFileName or check cgi_error for a problem?
Sep
14
comment CGI upload creates empty file
Another thing you might want to consider is dumping CGI in favor of Plack. CGI.pm is very old and very mature, but full of odd quirks that must stay or risk breaking thousands of scripts out in the wild that depend on those odd quirks. Also if you use Plack, your app can run as a CGI script or FastCGI or mod_perl or just about any other way a Perl program can be made into a web application.
Sep
14
comment CGI upload creates empty file
Reiterating @TLP, make sure you always use the 3-arg version of open, open my $local, ">", "$dir/$name" but you should definitely make sure that the filename is what you want it to be before doing that. You should die or return an error message if it doesn't pass a regular expression like /^\w+$/.
1 2 3 4 5