Skip to main content


I am following instruction to the t; both with CPANM and from source the install fails.
OPEN_SSL prefix is set as followed
export OPENSSL_PREFIX="/usr/local/opt/openssl@1.1"

Full error message here:
https://jumpshare.com/s/QMxo2rY1sf8j3nYGyEo8

Anyone able to help? Pulling my hair out.

submitted by /u/kosaromepr
[link] [comments]




I'm getting an SSL failure , and I can’t figure out what isn’t migrated properly from the perl setup

'auto_upgrade' => 1 }, 'Mojo::Asset::Memory' ) }, 'Mojo::Content::Single' ), 'error' => [ 'IO::Socket::SSL 1.75 required for TLS support' ], 'finished' => 3, 'state' => 'finished'

It seems to be using the same exact local Perl config but after a long time chasing I have dumped out the module includes for perl and it is failing to load the file:

$VAR475 = 'IO/Socket/SSL.pm';
$VAR476 = undef;And $VAR161 = 'Net/SSLeay.pm';
$VAR162 = undef;

Whereas on the working (current, old server)It’s printing out correctly:

$VAR479 = 'IO/Socket/SSL.pm';
$VAR480 = '/var/home/tyeeapps/support.thetyee.ca/www/local/lib/perl5/IO/Socket/SSL.pm';$VAR161 = 'Net/SSLeay.pm';
$VAR162 = '/var/home/tyeeapps/support.thetyee.ca/www/local/lib/perl5/x86_64-linux/Net/SSLeay.pm';

I've reinstalled the revelant modules from yum at the system level, which shouldn't matter. As well as on the perlbrew install in play, and in Carton, which the app is using

relevant line of code:

https://github.com/TheTyee/support.thetyee.ca/blob/e5cf4fd189ea4256c7de2a4f91303908770125a7/app.pl#L705

which does:

$res

= $ua->post( $API

. 'subscriptions' =>

{ 'Content-Type' => 'application/xml', Accept => '*/*' } =>

$transxml )->res;

}

my $xml = $res->body;

submitted by /u/nkrva
[link] [comments]



Taming the Unicode Beast - Felipe Gasper (from TPC 2022) submitted by /u/briandfoy
[link] [comments]


submitted by /u/davorg
[link] [comments]


goto::file - A batshit crazy idea! - Chad Granum - TPRC 2024 - Lightning Talk submitted by /u/briandfoy
[link] [comments]


Demystifying Perl One-Liners - Walter C. Mankowski - TPRC 2024 submitted by /u/briandfoy
[link] [comments]


submitted by /u/davorg
[link] [comments]


This year is the 25th Perl Advent Calendar. It's time to start planning what you'd like to write about, or throw some ideas for what you'd like to read.

It all happens through the Perl Advent GitHub repo.

submitted by /u/briandfoy
[link] [comments]




Supporting Universal Dependencies in the Tree Editor TrEd - Jan Štěpánek - TPRC 2024 submitted by /u/OODLER577
[link] [comments]


If there was a mechanism to,

  • Opt-into Markdown documentation on a per-file basis.
  • Document your code with Markdown instead instead of POD

Assuming these concerns were met,

  • A call to perldoc MyModule rendered the Markdown to text with something like mdcat which supports images, links
  • No browser was required at all (mdcat works without a browser).
  • Support for terminal-rendering of Markdown was a part of core.
  • All of this was done merely by creating a distinction between a code-comment, and a doc-comment as demonstrated in this repo, where
    • A doc comment was marked with a line starting ##
    • Any other use of # continues to carry code-commenting semantics


Would you prefer it and use it?

View Poll

submitted by /u/EvanCarroll
[link] [comments]





Perl is growing and adapting to the modern times, just like a new shiny Plug-In Hybrid car. Plug-in hybrid cars have the best of both worlds, an electric motor that has an average range of 20-60 miles and after its range is depleted it goes on the good old reliable gas motor for a few hundred miles.

Perl has many new shiny tech ( think of this as the Electric motor side of the Plug-In Hybrid car ) like Dancer2, Mojolicious , Starman and now COR which is a new OO system that is part of the language ( and many other cool new cpan modules that I might have missed * feel free to share your favorite new cpan module in the comments)

Perl has done a good job at keeping backwards compatibility ( now think of this as the gas engine side of the plugin hybrid car ) where many companies can still reliably run its perl code ( even after upgrading perl and obviously a few tweaks in the codebase here and there )

The Perl community is still active and its cpan modules continue to be maintained. Yes we have experienced a shrinking in the Perl community but the community has maintained a focus on improving the core modules that are shipped in the language and has paid close attention to widely used cpan modules ( read up on cpan river model - https://neilb.org/2015/04/20/river-of-cpan.html )

If you used to write Perl code or your curious about it then this is the best time to give Perl 5.40 a try and play around with some of its new web frameworks, cpan libraries and its new OO system COR.

submitted by /u/Itcharlie
[link] [comments]



Those who've been around long enough know that the use of programming languages was almost a religion a few years ago. For example, the .NET community made no secret of being a sect that branded other technologies as the devil's work. Admittedly, the Llama book was also considered a bible.

Until 20 years ago, Perl was regarded as an elite technology that one could boast about even barely mastering. Getting started with Perl was and still is tough and requires motivation. The reward for building Perl skills often comes years later when you calmly realize that even 10-year-old scripts still perform their duties perfectly - despite multiple system environment updates. Generally, even unoptimized Perl programs run more efficiently than new developments with technologies sold to us as the "hot shit."

One of Perl's top application areas is high-performance and robust web applications in mod_perl/2. To my knowledge, there's no comparable flexible programming language that can interact so closely with the web server and intervene in every layer of the delivery process. The language is mature, balanced, and the syntax is always consistent - at least for the Perl interpreter 😉 If you go to the official mod_perl page (perl.apache.org) in 2024, it recommends a manual written over 20 years ago, and even the link no longer works.

As a Perl enthusiast from the get-go and a full-stack developer, I feel today that - albeit reluctantly - I need to consider a technology switch. Currently, I'm still developing with mod_perl/2 and Perl Mason. As long as I'm working on interface projects, I'm always ahead of the game and can deliver everything in record time. However, when it comes to freelance projects or a new job, it's almost hopeless to bring in Perl experience, especially in Europe.

Throughout my career, I've also used other technologies such as Java Struts, PHP, C/C++, Visual Basic .NET, and I'd better not mention COBOL-85. I've always come back to Perl because of its stability. But I'm noticing that the language is effectively dead and hardly receives any updates or is talked about much. If I were forced to make a technology switch for developing full-stack applications, I would switch to React or Django. It's a shame.

submitted by /u/a430
[link] [comments]



I have been a Perl guy for 30+ years and have had the great idea to upgrade the Perl version of my large Perl APP to 5.40; after a lot of fiddeling around and overriding some Makefile.PL files I got the code and all required libraries to work on an AlmaLinux 9.4. Hoewever I am stuck on getting it to run locally on MacOS 14.5.

The two libraries currently roadblocking are Net::SSL and DBD::MariaDB. I am not fluent enough in C to understand how and if I can get things sorted; anyone able to help? Full compile errors below.

Net::SSL

cpanm (App::cpanminus) 1.9018 on perl 5.040000 built for darwin-2level Work directory is /Users/administrator/.cpanm/work/1721974215.35063 You have make /usr/bin/make You have LWP: 6.77 You have /usr/bin/tar: bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 You have /usr/bin/unzip Searching Net::SSL () on cpanmetadb ... --> Working on Net::SSL Fetching http://www.cpan.org/authors/id/N/NA/NANIS/Crypt-SSLeay-0.72.tar.gz -> OK Unpacking Crypt-SSLeay-0.72.tar.gz Entering Crypt-SSLeay-0.72 Checking configure dependencies from META.json Checking if you have Getopt::Long 0 ... Yes (2.57) Checking if you have ExtUtils::CBuilder 0.280205 ... Yes (0.280240) Checking if you have Try::Tiny 0.19 ... Yes (0.31) Checking if you have Path::Class 0.26 ... Yes (0.37) Configuring Crypt-SSLeay-0.72 Running Makefile.PL Argument "pro" isn't numeric in numeric ge (>=) at /usr/local/lib/perl5/5.40.0/ExtUtils/MM_Unix.pm line 47. Found libraries 'ssl, crypto, z' *** THIS IS NOT AN ERROR, JUST A MESSAGE FOR YOUR INFORMATION *** Do you really need Crypt::SSLeay? Starting with version 6.02 of LWP, https support was unbundled into LWP::Protocol::https. This module specifies as one of its prerequisites IO::Socket::SSL which is automatically used by LWP::UserAgent unless this preference is overridden separately. IO::Socket::SSL is a more complete implementation, and, crucially, it allows hostname verification. Crypt::SSLeay does not support this. At this point, Crypt::SSLeay is maintained to support existing software that already depends on it. However, it is possible that your software does not really depend on Crypt::SSLeay, only on the ability of LWP::UserAgent class to communicate with sites over SSL/TLS. If are using version LWP 6.02 or later, and therefore have installed LWP::Protocol::https and its dependencies, and do not explicitly use Net::SSL before loading LWP::UserAgent, or override the default socket class, you are probably using IO::Socket::SSL and do not really need Crypt::SSLeay. Before installing Crypt::SSLeay, you may want to try specifying a dependency on LWP::Protocol::https. ================================================================================ Output from '/Users/administrator/.cpanm/work/1721974215.35063/Crypt-SSLeay-0.72/openssl-version': OpenSSL 3.3.1 4 Jun 2024 30300010 ================================================================================ Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Crypt::SSLeay Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have Try::Tiny 0.19 ... Yes (0.31) Checking if you have Test::More 0.19 ... Yes (1.302199) Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.70) Checking if you have LWP::Protocol::https 6.02 ... Yes (6.14) Checking if you have MIME::Base64 0 ... Yes (3.16_01) Building and testing Crypt-SSLeay-0.72 cp lib/Crypt/SSLeay/Conn.pm blib/lib/Crypt/SSLeay/Conn.pm cp SSLeay.pm blib/lib/Crypt/SSLeay.pm cp lib/Crypt/SSLeay/Err.pm blib/lib/Crypt/SSLeay/Err.pm cp lib/Crypt/SSLeay/MainContext.pm blib/lib/Crypt/SSLeay/MainContext.pm cp lib/Crypt/SSLeay/Version.pm blib/lib/Crypt/SSLeay/Version.pm cp lib/Net/SSL.pm blib/lib/Net/SSL.pm cp lib/Crypt/SSLeay/CTX.pm blib/lib/Crypt/SSLeay/CTX.pm cp lib/Crypt/SSLeay/X509.pm blib/lib/Crypt/SSLeay/X509.pm Running Mkbootstrap for SSLeay () chmod 644 "SSLeay.bs" "/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- SSLeay.bs blib/arch/auto/Crypt/SSLeay/SSLeay.bs 644 "/usr/local/bin/perl" "/usr/local/lib/perl5/5.40.0/ExtUtils/xsubpp" -typemap '/usr/local/lib/perl5/5.40.0/ExtUtils/typemap' -typemap '/Users/administrator/.cpanm/work/1721974215.35063/Crypt-SSLeay-0.72/typemap' SSLeay.xs > SSLeay.xsc mv SSLeay.xsc SSLeay.c cc -c -fno-common -DPERL_DARWIN -mmacosx-version-min=14.5 -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -Wno-error=implicit-function-declaration -O3 -DVERSION=\"0.72\" -DXS_VERSION=\"0.72\" "-I/usr/local/lib/perl5/5.40.0/darwin-2level/CORE" SSLeay.c SSLeay.xs:152:31: warning: call to undeclared function 'SSLv3_client_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] ctx = SSL_CTX_new(SSLv3_client_method()); ^ SSLeay.xs:152:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') [-Wint-conversion] ctx = SSL_CTX_new(SSLv3_client_method()); ^~~~~~~~~~~~~~~~~~~~~ /usr/local/include/openssl/ssl.h:1634:47: note: passing argument to parameter 'meth' here __owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); ^ SSLeay.xs:157:31: warning: call to undeclared function 'SSLv2_client_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] ctx = SSL_CTX_new(SSLv2_client_method()); ^ SSLeay.xs:157:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') [-Wint-conversion] ctx = SSL_CTX_new(SSLv2_client_method()); ^~~~~~~~~~~~~~~~~~~~~ /usr/local/include/openssl/ssl.h:1634:47: note: passing argument to parameter 'meth' here __owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); ^ 2 warnings and 2 errors generated. make: *** [SSLeay.o] Error 1 -> FAIL Installing Net::SSL failed. See /Users/administrator/.cpanm/work/1721974215.35063/build.log for details. Retry with --force to force install it. 

and DBD::MariaDB (mariadb-devel is installed)
cpanm (App::cpanminus) 1.9018 on perl 5.040000 built for darwin-2level Work directory is /Users/administrator/.cpanm/work/1721974660.39142 You have make /usr/bin/make You have LWP: 6.77 You have /usr/bin/tar: bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 You have /usr/bin/unzip Searching DBD::MariaDB () on cpanmetadb ... --> Working on DBD::MariaDB Fetching http://www.cpan.org/authors/id/P/PA/PALI/DBD-MariaDB-1.23.tar.gz -> OK Unpacking DBD-MariaDB-1.23.tar.gz Entering DBD-MariaDB-1.23 Checking configure dependencies from META.json Checking if you have utf8 0 ... Yes (1.25) Checking if you have DBI 1.608 ... Yes (1.643) Checking if you have strict 0 ... Yes (1.13) Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.70) Checking if you have Data::Dumper 0 ... Yes (2.189) Checking if you have Getopt::Long 0 ... Yes (2.57) Checking if you have Devel::CheckLib 1.12 ... Yes (1.16) Checking if you have File::Spec 0 ... Yes (3.90) Checking if you have Config 0 ... Yes (5.040000) Checking if you have warnings 0 ... Yes (1.70) Configuring DBD-MariaDB-1.23 Running Makefile.PL Argument "pro" isn't numeric in numeric ge (>=) at /usr/local/lib/perl5/5.40.0/ExtUtils/MM_Unix.pm line 47. PLEASE NOTE: For 'make test' to run properly, you must ensure that the database user 'root' can connect to your MariaDB or MySQL server and has the proper privileges that these tests require such as 'drop table', 'create table', 'drop procedure', 'create procedure' as well as others. mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t'; For MySQL 8 it is needed to use different syntax: mysql> create user 'root'@'localhost' identified by 's3kr1t'; mysql> grant all privileges on test.* to 'root'@'localhost'; You can also optionally set the user to run 'make test' with: perl Makefile.PL --testuser=username I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/local/Cellar/mariadb/11.4.2/include/mysql -I/usr/local/Cellar/mariadb/11.4.2/include/mysql/mysql libs (mysql_config) = -L/usr/local/Cellar/mariadb/11.4.2/lib/ -lmariadb mysql_config (guessed ) = mariadb_config testauthplugin (default ) = testdb (default ) = test testhost (default ) = testpassword (default ) = testport (default ) = testsocket (default ) = testuser (guessed ) = root To change these settings, see 'perl Makefile.PL --help' and 'perldoc DBD::MariaDB::INSTALL'. Checking if libs and header files are available for compiling... Checking if correct version of MariaDB or MySQL client is present... Looks good. Embedded server: not supported by client library WARNING: Older versions of ExtUtils::MakeMaker may errantly install README.pod as part of this distribution. It is recommended to avoid using this path in CPAN modules. Client library deinitialize OpenSSL library functions: yes Checking if your kit is complete... Looks good Using DBI 1.643 (for perl 5.040000 on darwin-2level) installed in /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/ Generating a Unix-style Makefile Writing Makefile for DBD::MariaDB Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have Test::More 0.90 ... Yes (1.302199) Checking if you have bigint 0 ... Yes (0.67) Checking if you have lib 0 ... Yes (0.65) Checking if you have DynaLoader 0 ... Yes (1.56) Checking if you have Data::Dumper 0 ... Yes (2.189) Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.70) Checking if you have warnings 0 ... Yes (1.70) Checking if you have DBI::Const::GetInfoType 0 ... Yes (2.008697) Checking if you have Encode 0 ... Yes (3.21) Checking if you have vars 0 ... Yes (1.05) Checking if you have constant 0 ... Yes (1.33) Checking if you have Time::HiRes 0 ... Yes (1.9777) Checking if you have B 0 ... Yes (1.89) Checking if you have Test::Deep 0 ... Yes (1.204) Checking if you have FindBin 0 ... Yes (1.54) Checking if you have DBI 1.608 ... Yes (1.643) Checking if you have File::Temp 0 ... Yes (0.2311) Checking if you have strict 0 ... Yes (1.13) Checking if you have utf8 0 ... Yes (1.25) Building and testing DBD-MariaDB-1.23 cp lib/DBD/MariaDB.pm blib/lib/DBD/MariaDB.pm cp lib/DBD/MariaDB.pod blib/lib/DBD/MariaDB.pod cp lib/DBD/MariaDB/INSTALL.pod blib/lib/DBD/MariaDB/INSTALL.pod cp README.pod blib/lib/DBD/MariaDB/README.pod Running Mkbootstrap for MariaDB () chmod 644 "MariaDB.bs" "/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- MariaDB.bs blib/arch/auto/DBD/MariaDB/MariaDB.bs 644 "/usr/local/bin/perl" -p -e "s/~DRIVER~/MariaDB/g" /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/Driver.xst > MariaDB.xsi "/usr/local/bin/perl" "/usr/local/lib/perl5/5.40.0/ExtUtils/xsubpp" -typemap '/usr/local/lib/perl5/5.40.0/ExtUtils/typemap' MariaDB.xs > MariaDB.xsc Warning: duplicate function definition 'do' detected in MariaDB.xs, line 104 Warning: duplicate function definition 'rows' detected in MariaDB.xs, line 231 Warning: duplicate function definition 'last_insert_id' detected in MariaDB.xs, line 250 mv MariaDB.xsc MariaDB.c cc -c -I/usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI -I/usr/local/Cellar/mariadb/11.4.2/include/mysql -I/usr/local/Cellar/mariadb/11.4.2/include/mysql/mysql -DHAVE_DBI_1_634 -DHAVE_DBI_1_642 -DHAVE_PROBLEM_WITH_OPENSSL -fno-common -DPERL_DARWIN -mmacosx-version-min=14.5 -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -Wno-error=implicit-function-declaration -O3 -DVERSION=\"1.23\" -DXS_VERSION=\"1.23\" "-I/usr/local/lib/perl5/5.40.0/darwin-2level/CORE" MariaDB.c In file included from MariaDB.c:186: /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/Driver_xst.h:33:5: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] EXTEND(SP, params); ^~~~~~~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/pp.h:460:25: note: expanded from macro 'EXTEND' # define EXTEND(p,n) STMT_START { \ ^~~~~~~~~~ /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/dbipport.h:4185:31: note: expanded from macro 'STMT_START' # define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ ^ /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/Driver_xst.h:33:5: note: '{' token is here EXTEND(SP, params); ^~~~~~~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/pp.h:460:36: note: expanded from macro 'EXTEND' # define EXTEND(p,n) STMT_START { \ ^ In file included from MariaDB.c:186: /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/Driver_xst.h:33:5: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] EXTEND(SP, params); ^~~~~~~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/pp.h:466:25: note: expanded from macro 'EXTEND' } STMT_END ^ /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/Driver_xst.h:33:5: note: ')' token is here EXTEND(SP, params); ^~~~~~~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/pp.h:466:27: note: expanded from macro 'EXTEND' } STMT_END ^~~~~~~~ /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/dbipport.h:4186:25: note: expanded from macro 'STMT_END' # define STMT_END ) ^ ^ ./MariaDB.xsi:214:39: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] if (is_selectrow_array) { XSRETURN_EMPTY; } else { XSRETURN_UNDEF; } ^~~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/XSUB.h:340:27: note: expanded from macro 'XSRETURN_EMPTY' #define XSRETURN_EMPTY STMT_START { XSRETURN(0); } STMT_END ^~~~~~~~~~ /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/dbipport.h:4185:31: note: expanded from macro 'STMT_START' # define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ ^ ./MariaDB.xsi:214:39: note: '{' token is here if (is_selectrow_array) { XSRETURN_EMPTY; } else { XSRETURN_UNDEF; } ^~~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/XSUB.h:340:38: note: expanded from macro 'XSRETURN_EMPTY' #define XSRETURN_EMPTY STMT_START { XSRETURN(0); } STMT_END ^ ./MariaDB.xsi:214:39: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] if (is_selectrow_array) { XSRETURN_EMPTY; } else { XSRETURN_UNDEF; } ^~~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/XSUB.h:340:57: note: expanded from macro 'XSRETURN_EMPTY' #define XSRETURN_EMPTY STMT_START { XSRETURN(0); } STMT_END ^~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/XSUB.h:325:5: note: expanded from macro 'XSRETURN' STMT_START { \ ^~~~~~~~~~ /usr/local/lib/perl5/site_perl/5.40.0/darwin-2level/auto/DBI/dbipport.h:4185:31: note: expanded from macro 'STMT_START' Failed 6/7 subtests Can't use an undefined value as a subroutine reference at /usr/local/lib/perl5/5.40.0/TAP/Harness.pm line 612. make: *** [test_dynamic] Error 255 

submitted by /u/kosaromepr
[link] [comments]


Structure Based Structuring of Unstructured Data - Adam Russell - TPRC 2024 submitted by /u/OODLER577
[link] [comments]


I playing around with ntfy.sh, looking for a way to subscript to messages and execute code based on the content. I found the solution for json stream but websockets stops printing after a few messages or a short time. Any idea why? here is the code:
use v5.40 ; use IO::Async::Loop; use Net::Async::WebSocket::Client; my $client = Net::Async::WebSocket::Client->new( on_text_frame => sub( $self, $frame ) { print $frame ; }, ); my $loop = IO::Async::Loop->new; $loop->add( $client ); $client->connect( url => "wss://ntfy.sh/perl/ws" )->get ; $loop->run; 

submitted by /u/ktown007
[link] [comments]



Symbolic Lookup Errorhttps://preview.redd.it/6xs5lg07oned1.png?width=1135&format=png&auto=webp&s=86ff7dd499dc6d008de944fd699c9a52f9b7785b

I am trying to run a POST call in perl, using UserAgent with the agent set as curl,

This Perl throws this error. Do you guys have any idea on how to resolve this?

I have only one installation of Perl.

submitted by /u/alistair_0111
[link] [comments]



Hello,

Running CPAN behind a corporate proxy, it's not trusting the certs. The certs are installed on the machine so web browsing to https://cpan.org/r/perl/.rss works fine, but how can I modify the CPAN trust store to also trust these certs? I need to install a chain.

This is the error:

HTTP::Tiny failed with an internal error: SSL connection failed for cpan.org: SSL connect attempt failed error:0A000086:SSL routines::certificate verify failed

Thanks!

submitted by /u/L1onH3art_
[link] [comments]



I haven't been able to use the site in the last week or so. If it loads at all, it shows a Timeout Error after 30 seconds instead. Is it broken, and how long has it been this way?

submitted by /u/greg_kennedy
[link] [comments]



Catalyst, macOS and weird request latency (only when using Safari)Just wondering if anyone else has managed to resolve a similar issue to the one I am facing below?

I've installed the latest version of Catalyst under a PerlBrew environment (v5.38.2) and I'm working through the Catalyst manual. I can run the generated script/app_server.pl with no modifications at all and everything seems ok. That is, until I connect Safari to http://0.0.0.0:3000/r/perl/.rss as directed.

For some reason unknown to me, there is a roughly 30-second delay until the page is rendered. There are no Safari extensions enabled and there is no indication of any issue in Catalyst's console-logging.

Console Log

Safari Inspector Network Responses

I do not see this delay when issuing the same request from my Chromium-based browser (Brave). The response is instant.

I know the simple answer is to stop using Safari. Does anyone have any insights to share about what the problem might be with Safari? Other environmental factors: macOS Sonoma 14.5, running Catalyst under zsh in a tmux window.

Thanks.

submitted by /u/Biggity_Biggity_Bong
[link] [comments]




I am new to this subreddit, but not new to Perl, though I've been flirting with Python for a little over two years so I'm a little out of the loop.

If I wanted to create a RESTful API using Catalyst and have my Swagger docs generated automatically, are there any toolchain recommendations that anyone can make?

Thanks.

submitted by /u/Biggity_Biggity_Bong
[link] [comments]



submitted by /u/niceperl
[link] [comments]


submitted by /u/niceperl
[link] [comments]


submitted by /u/niceperl
[link] [comments]


As you may know, the release of a new version of Perl triggers the process to elect a new Perl Steering Council. That process has been taking place over the last few weeks and the results were announced a few days ago.

Congratulations to returning members Philip Bruhat and Graham Knop and to new member Aristotle Pagaltzis. And many thanks to retiring member Paul Evans.

https://psc.perlhacks.com/#members

submitted by /u/davorg
[link] [comments]



An analyzer has been implemented for the Perl track on exercism.org. Currently it uses Perl::Critic to give feedback when a user submits an implementation of an exercise.

The list of policies in use is quite lean at the moment, but hopefully the feedback should prove useful to newbies getting to grips with Perl!

submitted by /u/m_dango
[link] [comments]



I'm using h2xs to make glue code for a C library to a module. Imagine this scenario in the C header:

struct foo; struct foo * new_foo(); void set_foo_member(struct foo * f, int value); int get_foo_member(const struct foo * f); 

When I run h2xs -x on this I get something like this in the .xs file:
struct foo * new_foo() int get_foo_member(f) const struct foo * f void set_foo_member(f, value) struct foo * f int value 

and in the typemap:
const struct foo * T_PTROBJ struct foo * T_PTROBJ 

This builds fine, however, when I go to actually use the code like this:
my $foo = new_foo(); $foo->set_foo_member(123); print "Foo member is: " . $foo->get_foo_member(); 

I get an error like the following:
get_foo_member: Expected f to be of type const struct FooPtr; got struct FooPtr=SCALAR(0x2ecd9c2dd768) instead at ... 

Right, so, that's the backstory. XS checks the type of incoming objects and makes sure they match the expected type from the C header, and if they differ, it throws an error. But it seems to be considering struct foo * and const struct foo * to be two different types, even though they're not (really). Perl shouldn't care about this at all.

What's the solution here? Do I remove all const keywords in my XS code? Is there some switch or setting to make xsubpp treat both as the same type? Something else?

submitted by /u/greg_kennedy
[link] [comments]



I have a Perl script that takes several hours to run, I need to know when it's done, but I sometimes forget to keep checking.

It's running on Strawberry in Windows Server 2019. How easy would it be to write another script to send an email? I could run them as a batch I'm thinking.

I'm very weak at programming, I really only dabble.

submitted by /u/Hydraulis
[link] [comments]



It's gotta be me, but I'm at a loss. Installing with cpan: I can build XML::LibXML (lots of warnings) but the test suite refuses to run cleanly, staring with errors:

t/02parse.t ........................................ 1/533

# Failed test 'error parsing <!DOCTYPE X SYSTEM "example/ext\_ent.dtd">

# <X>\&foo;</X>

# '

# at t/02parse.t line 887.

# got: ''

# expected: anything else

# Looks like you failed 1 test of 533.`

and then getting worse from there.

I've installed the module on other Macs including other Intel boxes.

I've re-installed MacPorts (which is what I used to install LibXML2 and all the other prereqs).

I've built from source - same experience. Build succeeds, tests all fail.

I'm trying to figure out how to run the tests individually to see what's going on in better detail, but if anyone has seen and solved this funky issue of getting XML::LibXML to build and run cleanly on Mac OSX, please -I'd love to hear it. Everything else builds/tests/installs fine. reports does show some failed Mac builds.

submitted by /u/OS2REXX
[link] [comments]



submitted by /u/oalders
[link] [comments]


I have a Mac M1 chip laptop.

While I have managed to install a couple of modules, most fail to install.

I tried perlbrew, but that was a struggle to even get it to install perl itself, but when it was installed it wasn't working the way I needed it to.

Just wondering if I am missing something with CPAN or if this is an issue because it's an M1 chip?

submitted by /u/MrCosgrove2
[link] [comments]



The final installment in the series:

"The-Quest-For-Performance" from my blog Killing It with #perl

Discussing #python #numpy #numba, #rstats #openMP enhancements of Perl code and #simd

Bottom line: I will not be migrating to Python anytime soon.

Food for thought: The Perl interpreter (and many of the modules) are deep down massive C programs. Perhaps one can squeeze real performance kicks by looking into alternative compilers, compiler flags and pragmas ?

https://chrisarg.github.io/Killing-It-with-PERL/2024/07/09/The-Quest-For-Performance-Part-IV-May-the-SIMD-Force-Be-With-You.html

submitted by /u/ReplacementSlight413
[link] [comments]




I would be interested to know why you chose Perl and how long you have been using it and what for.

I have just returned to Perl after many years away, think decades rather than a couple of years. Consider me a noob as I've long forgotten anything I knew about the language.

I run a small home webserver, Apache on Windows 10 with Strawberry Perl, and recently started some projects starting with moving away with things like Google Analytics and going back to some old log analyzers such as AWStats, which is still being maintained, and W3Perl, which is not. Even more recently I have started using Ringlink.

Perl is still being developed, Strawberry, Active State, CPAN etc. but lost out to PHP and Python. Just like COBOL, I can easily imagine thousands of systems depend on Perl.

submitted by /u/brisray
[link] [comments]




Have been using the official MongoDB driver to date (https://metacpan.org/dist/MongoDB) but its obviously EOL and now I can't get it to work with perl v.540 on OSX.

For those interested it fails on BSON::XS and I cannot force install either.

cp XS/XS.xs blib/lib/BSON/XS/XS.xs Running Mkbootstrap for XS () chmod 644 "XS.bs" "/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- XS.bs blib/arch/auto/BSON/XS/XS.bs 644 "/usr/local/bin/perl" "/usr/local/lib/perl5/5.40.0/ExtUtils/xsubpp" -typemap '/usr/local/lib/perl5/5.40.0/ExtUtils/typemap' xs/XS.xs > xs/XS.xsc mv xs/XS.xsc xs/XS.c cc -c -I. -Ibson -fno-common -DPERL_DARWIN -mmacosx-version-min=14.5 -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_GNU_SOURCE -DMONGO_USE_64_BIT_INT -DBSON_COMPILATION -Wno-error=implicit-function-declaration -O3 -DVERSION=\"v0.8.4\" -DXS_VERSION=\"v0.8.4\" -o xs/XS.o "-I/usr/local/lib/perl5/5.40.0/darwin-2level/CORE" xs/XS.c xs/XS.xs:216:3: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] PUSHMARK (SP); ^~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/pp.h:120:5: note: expanded from macro 'PUSHMARK' STMT_START { \ ^~~~~~~~~~ ./ppport.h:4305:31: note: expanded from macro 'STMT_START' # define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ ^ xs/XS.xs:216:3: note: '{' token is here PUSHMARK (SP); ^~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/pp.h:120:16: note: expanded from macro 'PUSHMARK' STMT_START { \ ^ xs/XS.xs:216:3: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] PUSHMARK (SP); ^~~~~~~~~~~~~ /usr/local/lib/perl5/5.40.0/darwin-2level/CORE/pp.h:129:5: note: expanded from macro 'PUSHMARK' } STMT_END ^ 

With that said, whats the most appropriate alternative out there?

submitted by /u/kosaromepr
[link] [comments]



A couple of data/compute intensive examples using Perl Data Language (#PDL), #OpenMP, #Perl, Inline and #Python (base, #numpy, #numba). Kind of interesting to see Python eat Perl's dust and PDL being equal to numpy.

OpenMP and Perl's multithreaded #PDL array language were the clear winners here.


https://chrisarg.github.io/Killing-It-with-PERL/2024/07/06/The-Quest-For-Performance-Part-I-InlineC-OpenMP-PDL.html

https://chrisarg.github.io/Killing-It-with-PERL/2024/07/07/The-Quest-For-Performance-Part-II-PerlVsPython.md.html

submitted by /u/ReplacementSlight413
[link] [comments]



Hello all. I installed Perlbrew to try it out using Perl modules without admin rights. My machine is Linux EOS. When I run a simple perl script it gives error Cant locate Modern/Perl.pm in \@INC. How do I make Emacs know that I am using perlbrew and not system Perl? Or how do add the perlbrew PATH to global \@INC? I also have setup Devel::PerlySense inside Emacs following the module documentation. I installed some modules using cpanm client. I'm new to Perl and Emacs and sometimes I'm lost n doesnt know what I'm doing lol 😀 Appreciate your pointing me to the right direction. Below are some log details:


Can't locate Modern/Perl.pm in u/INC (you may need to install the Modern::Perl module) (@INC entries checked: /usr/lib/perl5/5.38/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.38/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.38/core_perl /usr/share/perl5/core_perl) at ./read_input_stdin line 4.

BEGIN failed--compilation aborted at ./read_input_stdin line 4.

❯ perlbrew info

Current perl:

Name: perl-blead

Path: /home/user/perl5/perlbrew/perls/perl-blead/bin/perl

Config: -de -Dprefix=/home/user/perl5/perlbrew/perls/perl-blead -Dusedevel -Aeval:scriptdir=/home/user/perl5/perlbrew/perls/perl-blead/bin

Compiled at: Jul 6 2024 10:50:31

perlbrew:

version: 0.98

ENV:

PERLBREW_ROOT: /home/user/perl5/perlbrew

PERLBREW_HOME: /home/user/.perlbrew

PERLBREW_PATH: /home/user/perl5/perlbrew/bin:/home/user/perl5/perlbrew/perls/perl-blead/bin

PERLBREW_MANPATH: /home/user/perl5/perlbrew/perls/perl-blead/man

❯ perl --version

This is perl 5, version 41, subversion 2 (v5.41.2 (c5df4fd1012cc64d1b3e19c87bf8c51d4f3f90d6)) built for x86_64-linux

❯ perlbrew list-modules | grep modern

Modern::Perl

submitted by /u/Ill-Dependent2628
[link] [comments]



submitted by /u/davorg
[link] [comments]



Building an OpenAI chatbot in Corinna submitted by /u/OvidPerl
[link] [comments]



I am fairly new to Perl. I did a lot with it in the mid 90s and came back about 8 months ago. There is a lot I dont know and probably a lot of things I have forgotten.

I picked up Perl to write a couple of applications that I was hoping could run on MacOS, Linux,OpenBSD, and Windows. Perl runs on all of them and many come with Perl built in. Simple scripts I have written run pretty well. (Lets forget about Windows for now).

When I start using libraries(packages?) there is a world of hurt.

Now some libraries pretty much usually work, but many do not. Which works and which do not seems to be dependent upon the operating system and distro.

Then I have to start with what version of Perl is running everywhere. That is annoying.

I end up spending a lot of time on a new machine when I want to run my application, doing nothing else than trying to get the libraries installed.

So I decided to adopt PerlBrew (havent tried it on OpenBSD yet) That should give me a stable version across the differnt platforms.

Then I decided I wanted to write a shell script that would handle installing all of the libarires I might use once and for all so I would know they were all accounted for.

perlbrew exec -q --with perl-5.40.0 cpanm install DBI

Then libraries I have pulled from CPAN do not work.

Google here and Google there.

Ok install GCC and make (I should have known this) More problems:

I found a few of these: "Why are you using CPAN for this? Use the compiled packages that come with <OS><type>"

Hmm I would have thought that CPAN shold be the best source? How do I know what exists as pre built packages on what platform?

Using apt search "perl" or "-perl" or "perl" does not help that much.

I have XML::LibXML working on Mac but getting it working on Ubuntu 22 I have been able to do. I have even tried to start OpenBSD yet)

Is writing cross platform applications in Perl meant to be this difficult?

Should I avoid libraries at all costs and write an aweful lot of code myself?

Is there an easy way to guess what libraries will almost certainly work and what libraries will most likely never work? Some kind of warning system?

Should I look into using pp? I havent yet figured out how to make it compile for Ubuntu,MacOs,OpenBSD yet.

In GoLang its a couple of flags to set for each architecture and off it goes.

ShouldI look into Par files? (or was it Far) that are supposesd to contain the nessescary libraries within itself?

What am I doing wrong?

Libraries in my current set Given all the experimenting some of them are now wrong.

Array::Set, Array::Unique, Bundle::LWP, Data::Dump, Data::Dumper, DateTime, DBD::SQLite, DBI, Digest::file, Digest::MD5, Digest::MD5::File, File::Basename, File::Compare, File::Copy, File::Find, File::Find::Rule, File::Glob, File::Path, File::Slurp, File::Spec, Image::ExifTool, Image::Info, IO::All, List::Compare, List::Gen, List::MoreUtils, List::SomeUtils, List::Util, List::UtilsBy, Log::Minimal, LWP, LWP::Simple, Path::Tiny, Term::ANSIColor, Text::Fuzzy, Type::Tiny,Moose,MooseX::Types,WWW::Mechanize

submitted by /u/NoeticIntelligence
[link] [comments]



You may have noticed the slow pace of Corinna development. As it turns out, there's an easy way to speed up the development: tell Paul.

I had a call with Paul "LeoNerd" Evans last night and this, including his email address, is being shared with his permission.

As you might imagine, being a core Perl developer, Paul has many things on his plate. Currently has has tons of PRs against the Perl core, he's doing new work such as experimenting with data checks (don't call them "types"!), and is active on the Perl steering council and in P5P. However, he's previously mentioned that he doesn't get much feedback on his work. For adding something as important as Corinna, just blindly adding it without hearing from the community is bad. Yes, we had a multi-year design phase and Corinna is much better for it, but that doesn't mean it's perfect and we don't want to screw this up.

So here's where you come in. Email Paul at leonerd at leonerd.org.uk. Tell him your thoughts about Corinna. He's he one implementing it and working in isolation as he is, despite his work with Object::Pad, isn't good. Tell him what you like, what you don't like, what you'd like to see next, what bugs you've encountered, and so on. Without hearing from you, he has no way of judging community thoughts/support for this project, so he needs your help.

If you'd like a quick refresher on the new syntax, I've written a short introduction. Here's a dead-simple LRU cache written in the new syntax:

use feature 'class'; class Cache::LRU { use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param :reader = 20; method set( $key, $value ) { $cache->unshift( $key, $value ); # new values in front if ( $cache->keys > $max_size ) { $cache->pop; } } method get($key) { return unless $cache->exists($key); my $value = $cache->get($key); $cache->unshift( $key, $value ); # put it at the front return $value; } } 

submitted by /u/OvidPerl
[link] [comments]