68,317 questions
0
votes
0
answers
57
views
How to match ssh-keygen's "randomart" with Expect?
When trying to match the "randomart" part of ssh-keygen's output using Expect, expect() finds an empty string after the "randomart", but not the expected eof, but I don't ...
-1
votes
2
answers
144
views
CGI in Perl: how to access the original HTTP headers
A simple proxy in Perl runs as a CGI on the webserver of my ISP.
It's purpose is to forward https GET and POST to a http webserver running on my PC.
With that https works without the need of any TLS ...
1
vote
2
answers
177
views
Why is the position of `[:space:]` within a character class seemingly important?
I'd like to use constants to build regular expressions. However, in this case I got an unexpected syntax error:
#!/usr/bin/perl
use strict;
use warnings;
use constant CR_SAFE => '[:alnum:]@,._\-...
0
votes
2
answers
126
views
TLS in Perl REST request
This curl command works fine (must be accessed in tls 1.3):
curl -v --tlsv1.3 -u "xxxx":"xxx" -X POST "https:xxxxxxx"
Try to get the same result with Perl. Created a ...
Best practices
0
votes
6
replies
102
views
Prototype mismatch importing symbols
I get a "Prototype mismatch" warning in code that either imports 'blessed' from Scalar::Util or defines it depending on the version of Scalar::Util. Is there a way to suppress the warning, ...
2
votes
2
answers
132
views
Troubleshooting: A single regular expression matching nested braces usable for java and perl
I have a regular expression in an extension of java by florian ingerl
to parse a latex command,
\\\\DocumentMetadata(?<docMetadata>\\{(?:[^{}]|(?'docMetadata'))*\\})
but the important thing is ...
1
vote
0
answers
135
views
Benchmarking Perl's Net::Async::FastCGI app consistently return LOTS of "Non-2xx responses"
Seeking community wisdom on why the ApacheBench utility consistently returns a lot of "Non-2xx responses" ( 502 Bad Gateway ) when running a benchmark test of my helloworld web app using ...
0
votes
2
answers
145
views
How to execute code in response to uncaught exceptions
In some perl code I'm evaluating $v1 $op $v2 to make sure the result is valid and the program does not abort.
However when $op eq '/' and $v2 == 0 I noticed that a user-defined die handler is called (...
-5
votes
1
answer
103
views
Why does OpenAPI output validation fail for an endpoint but not for others?
I want to create an asynchronuous OpenAPI interface. Async jobs return a 202 and a location header to query later.
This is my OpenAPI document:
---
components:
headers:
JobLocation:
...
Tooling
3
votes
5
replies
122
views
Why is this proxied Mojolicious request much much slower than directly accessing the upstream server?
I am trying to implement a Mojolicious application that (also) acts as a proxy in front or rclone serve.
To that purpose I am trying to get Mojolicious to act as a proxy, and request from rclone serve ...
Advice
2
votes
7
replies
190
views
Perl library to create static HTML
Long story short I have written my own custom HTML template system that I am very happy with. However I have done that with manually concatenating HTML tags, and it is a bit messy. There has to be a ...
3
votes
2
answers
224
views
Is `use source::encoding "ascii";` implied by `use v5.42;`?
According to the new source::encoding pragma's documentation,
use source::encoding 'ascii' is automatically enabled within the lexical scope of a use v5.41.0 or higher.
To me, this means that
use v5....
7
votes
1
answer
146
views
Getting import errors for a symbol I'm not requesting
I'm running into a weird import error message while trying to create a commandline tool that references packages within a Perl web application. The web application itself is working fine. I can ...
2
votes
2
answers
112
views
Perl XML::LibXML and Storable equals segfault?
When using the perl library Storable to store and retrieve XML::LibXML document objects, I get a segmentation fault. Specifically, once I use the LibXML routine findnodes. My question is: why, and is ...
5
votes
2
answers
142
views
How to more nicely pull all values from hash that aren't a given key?
I know how to get all of the values of a hash given a set of keys:
use strict;
use warnings;
use DDP;
my %h = (
a => 1,
b => 2
);
my @v = @h{a,b};
p @v; # ( 1, 2 )
However I'm not sure ...