If
you have a question on how to do something in Perl, or
you need a Perl solution to an actual real-life problem, or
you're unsure why something you've tried just isn't working...
then this section is the place to ask.
However, you might consider asking in the chatterbox first (if you're a
registered user). The response time tends to be quicker, and if it turns
out that the problem/solutions are too much for the cb to handle, the
kind monks will be sure to direct you here.
I accidentally typed perl v in the terminal and saw a strange message. I tried every letter and found that they all say something like Can't open perl script "z": No such file or directory
except four special letters do something different does anyone know why?
perl a
(nothing happens)
perl b
(nothing happens)
perl c
Unrecognized character \xCF; marked by <-- HERE after <-- HERE near co
+lumn 1 at c line 1.
perl v
Number found where operator expected (Do you need to predeclare "perl"
+?) at v line 2, near "perl 5"
syntax error at v line 2, near "perl 5"
Execution of v aborted due to compilation errors.
I have several modules which fetch data from various websockets (WS), processes it and returns back results. Fetching and processing for each websocket is different so I guess I need many Modules.
async sub fetch {
my $loop = IO::Async::Loop->new;
my @data;
my $client = Net::Async::WebSocket::Client->new(
on_text_frame => sub {
my ( $clientself, $frame ) = @_;
...
push @data, $frame;
# when I had enough frames
if( 10 < scalar @data ){
say "I am ".__PACKAGE__."::fetch() and we had enough data";
$clientself->close; $loop->stop;
return;
}
} # on_text_frame
);
$loop->add( $client );
await $client->connect(url => $myurl);
# tell the WS that we need data
$client->send_text_frame('send me data');
$loop->run;
my $retdata = Future->done(\@data)->get;
# save $retdata to file
...
# and return
return $retdata;
}
sub give_me_data {
# collapse the future
my $data = $self->fetch()->get();
# process data
...
return $processed_data
}
I thought that worked OK, until I needed more modules like the above for differrent websockets (which provide different data structures, and need different processing, hence the many modules which blackbox the fetch+process data into a give_me_data())
Now, these modules are loaded like:
# main
use ModuleA;
use ModuleB;
sub give_me_data {
# no Future here:
my $dataA = ModuleA->new()->give_me_data();
my $dataB = ModuleB->new()->give_me_data();
return ...
}
But there is a problem: $dataB is *empty* because the Loop in ModuleB thinks that we have received enough frames already and stops receiving (the check when enough frames are received is included above). But the debug message when this happens coming from ModuleB mentions ModuleA::fetch()! Note that the data returned from ModuleB is empty (whereas ModuleA returned lots of data).
1. Does the code-sketch for fetching data look OK to you? It will be difficult to provide running code but I can try if needed.
2. Can there be multiple IO::Async::Loop's each one on its own Module? All modules loaded but the loops activated *sequentially*. My intention is to dispense each loop when enough data is fetched and then continue to the next Module's loop (instantiate, loop and dispense) and so on. Am I stopping and dispensing the loops OK? Why does it remember ModuleA's fetch() when running ModuleB's loop?
3. If I have hit a wall, is there a simpler, possibly blocking, alternative for receiving data from websocket? (I have tried Mojo::UserAgent with some failures for some of the websockets). I do not really need non-blocking fetches because I need the total data from all modules before I proceed.
I've experienced a strange failure with "Resource temporarily unavailable".
The hefty cascade of messages shown here, I think this is known as a "call stack"?:
Configuring R/RJ/RJBS/Dist-Zilla-6.037.tar.gz with Makefile.PL
0 main perl 1106 child_info_fork::abort: \??\C:\ix\cygwin\usr\local\lib\perl5\site_perl\5.40\x86_64-cygwin-threads\auto\Compress\Raw\Bzip2\Bzip2.dll: Loaded to different address: parent(0x3F07F0000) != child(0x4C08D0000)Error while running PL phase: Couldn't fork(): Resource temporarily unavailable at /usr/local/share/perl5/site_perl/5.40/Capture/Tiny.pm line 242.
Capture::Tiny::_fork_exec("stderr", HASH(0xa03589cb8)) called at /usr/local/share/perl5/site_perl/5.40/Capture/Tiny.pm line 235
Capture::Tiny::_start_tee("stderr", HASH(0xa03589cb8)) called at /usr/local/share/perl5/site_perl/5.40/Capture/Tiny.pm line 364
Capture::Tiny::_capture_tee(1, 1, 1, 1, CODE(0xa02709420)) called at /usr/share/perl5/vendor_perl/5.40/CPAN/Reporter.pm line 161
CPAN::Reporter::record_command("/usr/bin/perl Makefile.PL") called at /usr/local/share/perl5/site_perl/5.40/CPAN/Distribution.pm line 2093
eval {...} called at /usr/local/share/perl5/site_perl/5.40/CPAN/Distribution.pm line 2093
CPAN::Distribution::prepare(CPAN::Distribution=HASH(0xa09c73b00)) called at /usr/local/share/perl5/site_perl/5.40/CPAN/Distribution.pm line 2217
CPAN::Distribution::make(CPAN::Distribution=HASH(0xa09c73b00)) called at /usr/local/share/perl5/site_perl/5.40/CPAN/Distribution.pm line 3676
CPAN::Distribution::test(CPAN::Distribution=HASH(0xa09c73b00)) called at /usr/local/share/perl5/site_perl/5.40/CPAN/Distribution.pm line 4167
CPAN::Distribution::install(CPAN::Distribution=HASH(0xa09c73b00)) called at /usr/local/share/perl5/site_perl/5.40/CPAN/Module.pm line 484
eval {...} called at /usr/local/share/perl5/site_perl/5.40/CPAN/Module.pm line 483
CPAN::Module::rematein(CPAN::Module=HASH(0xa09c70ce8), "install") called at /usr/local/share/perl5/site_perl/5.40/CPAN/Module.pm line 592
CPAN::Module::install(CPAN::Module=HASH(0xa09c70ce8)) called at /usr/local/share/perl5/site_perl/5.40/CPAN/Shell.pm line 1901
CPAN::Shell::rematein("CPAN::Shell", "install", "Dist::Zilla") called at /usr/local/share/perl5/site_perl/5.40/CPAN/Shell.pm line 2068
CPAN::Shell::__ANON__("CPAN::Shell", "Dist::Zilla") called at /usr/local/share/perl5/site_perl/5.40/App/Cpan.pm line 635
App::Cpan::__ANON__("Dist::Zilla") called at /usr/local/share/perl5/site_perl/5.40/App/Cpan.pm line 652
App::Cpan::_default(ARRAY(0xa00027238), HASH(0xa014d9b80)) called at /usr/local/share/perl5/site_perl/5.40/App/Cpan.pm line 536
App::Cpan::run("App::Cpan", "IO::Compress", "App::ccdiff", "Dist::Zilla") called at /usr/local/bin/cpan line 15
RJBS/Dist-Zilla-6.037.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Dist::Zilla'.
I'd like to know what the good Monks think about that?
Good Monday* Monks and Nuns. Over the weekend I sought to install the
Dist::Zilla module and of course its dependencies. Previously I had tried to create a
stack of the necessary modules using Pinto (and that's another story)
The message emitted by cpanm looks approximately like this ("approximately"
because I tidied it up in vim):
! Installing the dependencies failed:
Module 'Moose' is not installed
Module 'Config::MVP::Assembler' is not installed
Module 'Test::File::ShareDir' is not installed
Module 'MooseX::Types' is not installed
Module 'DateTime' is not installed
Module 'MooseX::Types::Perl' is not installed
Module 'Perl::PrereqScanner' is not installed
Module 'Config::MVP::Assembler::WithBundles' is not installed
Module 'Config::MVP::Reader' is not installed
Module 'Config::MVP' is not installed
Module 'CPAN::Uploader' is not installed
Module 'MooseX::Role::Parameterized' is not installed
Module 'Sub::Exporter::ForMethods' is not installed
Module 'Log::Dispatchouli' is not installed
Module 'namespace::autoclean' is not installed
Module 'Moose::Role' is not installed
Module 'File::Copy::Recursive' is not installed
Module 'MooseX::Types::Moose' is not installed
Module 'App::Cmd::Tester::CaptureExternal' is not installed
Module 'MooseX::LazyRequire' is not installed
Module 'Config::MVP::Reader::INI' is not installed
Module 'Test::Fatal' is not installed
Module 'Config::MVP::Reader::Finder' is not installed
Module 'Moose::Util::TypeConstraints' is not installed
Module 'MooseX::SetOnce' is not installed
Module 'Config::MVP::Reader::Findable::ByExtension' is not installed
Module 'Config::MVP::Section' is not installed
Module 'App::Cmd::Command::version' is not installed
Module 'App::Cmd::Tester' is not installed
Module 'App::Cmd::Setup' is not installed
! Bailing out the installation for Dist-Zilla-6.037.
cpanm was invoked like this: cpanm -v -L ~/Repositories_Perl/Dist-Zilla --self-contained Dist::Zilla
Hi Monks and Nuns. Here's another node that's not about perl coding per se but is instead about perl infrastructure/tool setup/installation.
Attempting to install Pinto on Linux - seeing error "! Couldn't find module or a distribution Pinto"
I am trying to bootstrap the Pinto perl module management application on a
machine running Debian Gnu/Linux. I have already had Pinto running on a different
(Cygwin Perl) system for some months, so I thought I knew my way around the setup.
But over the last two days I've repeatedly gotten the same error in the terminal when
trying to set up:
! Couldn't find module or a distribution Pinto
This error message is (obviously?) coming from cpanm, which the Pinto setup script
bootstraps. I see this error manifests when cpanm attempts to download Pinto and its dependencies from the
online repository its author had set up. That repo has the url
https://www.stratopan.com/thaljef/OpenSource/pinto-release . It looks like a network
problem, doesn't it? So when I do
$ ping -c4 stratopan.com
... I get no replies to my ping, although the domain does resolve to 138.68.43.143.
But when I point a browser at https://www.stratopan.com
I land on an active home page, although Firefox warns me about expired
certificates.
It's a lot to ask maybe, but could a reader just try it (setting up Pinto)? It's a one-line command:
$ curl -L http://getpinto.stratopan.com | bash
Very grateful thanks for applying some brain-power / knowledge to this problem I'm having. And, PS,
wouldn't it be theoretically possible to copy over all the module dependencies from my CygPerl installation
of Pinto to the Linux machine? I've looked, but I can't find a set-aside heirarchy of such modules.
We are trying to implement distributed tracing (APM-style request tracing) for a legacy Perl application running in a microservices environment.
Our goal is limited to application tracing only:
Create traces and spans inside the Perl application
Export them to a tracing backend such as Jaeger, Zipkin, Tempo, or an APM platform
We do not require infrastructure metrics or logs.
We attempted to use OpenTelemetry for Perl. While we were able to create traces and spans, we could not reliably export them due to limitations in the Perl ecosystem.
Our findings so far:
OTLP over gRPC is not supported due to lack of a stable Perl gRPC client ecosystem and no gRPC exporter in the Perl OpenTelemetry SDK.
OTLP over HTTP (JSON) is incomplete; the Perl OTLP JSON encoder is not fully compliant.
OTLP over HTTP (Protobuf) requires runtime .proto compilation using Google::ProtocolBuffers::Dynamic, which is not feasible or reliable in production.
OTLP wire-format compliance cannot be achieved from Perl.
This appears to be a language ecosystem limitation rather than a configuration issue.
We also evaluated Jaeger and Zipkin. However, they are tracing backends only and cannot generate traces or spans themselves without a supported Perl instrumentation and export mechanism.
Given this situation, I would appreciate guidance from experienced Perl users on the following questions:
Is true distributed tracing / APM for Perl applications realistically possible today?
Are there any community-recommended Perl modules or approaches to export traces (for example using Jaeger Thrift, Zipkin HTTP, or other non-OTLP formats)?
Are there any platforms or vendors (open source or commercial) that successfully support Perl tracing in production?
If Perl-level instrumentation is not practical, are proxy-based or gateway-based tracing approaches (for example using Nginx or Envoy) the recommended solution for legacy Perl applications?
In your experience, what is the most practical and supported way to achieve observability for Perl services?
Any pointers to existing CPAN modules, real-world implementations, or alternative strategies would be greatly appreciated.
In Excel using OLE, one can access the threaded comments using the CommentsThreaded collection. Entries in that collection can be read with code like $comment->Text; and $comment->Delete;. Is there a list of other items that can be specified?
On Windows 11, perl-5.42.0 and later, a string assignment (in XS) to an SV's PV buffer using sv_setpv can drastically reduce the value of SvLEN.
Demo:
use strict;
use warnings;
use Devel::Peek;
use Inline C =><<'EOC';
void foo(SV * buffer) {
char *data = "Hello there";
sv_setpv(buffer, data);
}
EOC
my $buffer = 'z' x 60;
Dump $buffer;
foo($buffer);
Dump $buffer;
I've been trying to install a Bundle:: made on an older computer, to a newer one with a pristine perl installation. I'm running into repeated fails when I get to Module::Package and I am hoping for one or more of two things to happen: (a) just by writing out what seems to be happening I'll have a burst of enlightenment, or (b) someone reading this will provide answers that lead to success.
The system is Cygwin on Windows 11, perl version 5.40.3 ("system" perl for an up to date Cygwin).
Here's some of what I see in the terminal:
INGY/Module-Install-ManifestSkip-0.24.tar.gz
Tests succeeded but one dependency not OK (Module::Manifest::Skip)
INGY/Module-Install-ManifestSkip-0.24.tar.gz
dependencies -- NA
INGY/Module-Package-0.30.tar.gz
Has already been unwrapped into directory /cygdrive/D/var/cache/builds/CPAN/Module-Package-0.30-2
INGY/Module-Package-0.30.tar.gz
Has already been prepared
Running make for I/IN/INGY/Module-Package-0.30.tar.gz
Warning: Prerequisite 'Module::Install::ManifestSkip => 0.19' for 'INGY/Module-Package-0.30.tar.gz' failed when processing 'INGY/Module-Install-ManifestSkip-0.24.tar.gz' with 'make_test => NO one dependency not OK (Module::Manifest::Skip)'. Continuing, but chances to succeed are limited.
It's a bit unfortunate that the module names are so similar. It makes my eyes cross when I try to scan the output.
Fail point:
Fetching http://192.168.1.7/minicpan/authors/id/I/IN/INGY/Module-Install-ManifestSkip-0.24.tar.gz ... OK
Configuring Module-Install-ManifestSkip-0.24 ... Checking if your kit is complete...
Looks good
Warning: prerequisite Module::Manifest::Skip 0.18 not found.
Generating a Unix-style Makefile
Writing Makefile for Module::Install::ManifestSkip
Writing MYMETA.yml and MYMETA.json
OK
==> Found dependencies: Module::Manifest::Skip
--> Working on Module::Manifest::Skip
Fetching http://192.168.1.7/minicpan/authors/id/I/IN/INGY/Module-Manifest-Skip-0.23.tar.gz ... OK
Configuring Module-Manifest-Skip-0.23 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Module::Manifest::Skip
Writing MYMETA.yml and MYMETA.json
OK
Building and testing Module-Manifest-Skip-0.23 ... FAIL
Testing Module-Manifest-Skip-0.23 failed.
Here's a portion of the graphical YAML metadata for the package that seems uninstallable, Module::Manifest::Skip, that is causing failure to install Module::Package (generated by: cpanm --scandeps --format=yaml Module::Install::ManifestSkip):
---
-
- cpanid: INGY
cpanmeta: !!perl/hash:CPAN::Meta
abstract: Generate a MANIFEST.SKIP file
author:
- 'Ingy dt Net <ingy@cpan.org>'
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.132830, CPAN::Meta::Converter version 2.150005'
license:
- perl_5
meta-spec:
url: http://search.cpan.org/perldoc?CPAN::Meta::Spec
version: 2
name: Module-Install-ManifestSkip
no_index:
directory:
- inc
- t
- xt
- example
prereqs:
configure:
requires:
ExtUtils::MakeMaker: 6.30
develop:
requires:
Test::Pod: 1.41
runtime:
requires:
Module::Install: 1.10
Module::Manifest::Skip: 0.18
perl: v5.8.1
Jan 26, 2026 at 18:41 UTC
A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes, and eternally young Donald Fagen —> I.G.Y. (Slightly modified for inclusiveness)