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. Post a new question!

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.

User Questions
Net::LibIDN and GNU Libidn
No replies — Read more | Post response
by mistersquid
on Nov 19, 2018 at 13:33

    tl;dr: I think I need guidance on how to specify <LIBPATH> in

    perl Makefile.PL --with-libidn=<LIBPATH> --with-libidn-inc=<INCPATH>

    Additional details:

    Building Net::LibIDN using

    perl Makefile.PL --with-libidn=/usr/local/lib --with-libidn-inc=/usr/local/include

    yields the following error

    ld: library not found for -lidn clang: error: linker command failed with exit code 1 (use -v to see in +vocation) ld: library not found for -lidn clang: error: linker command failed with exit code 1 (use -v to see in +vocation) This module requires GNU Libidn, which could not be found.

    However, I do have GNU Libidn2 installed as follows

    /usr/local/lib/libidn2.0.dylib /usr/local/lib/libidn2.a /usr/local/lib/libidn2.dylib /usr/local/lib/libidn2.la /usr/local/include/idna.h -> /usr/local/include/idn2.h /usr/local/include/idn2.h

    For context, I ran into the same problem as this StackOverflower except I'm on macOS 10.14 Mojave and was able to make my way past

    __test1.c:1:10: fatal error: 'idna.h' file not found #include <idna.h> ^~~~~~~~

    by creating the symlink

    /usr/local/include/idna.h

    which points to

    /usr/local/include/idn2.h

    Thank you in advance for any pointers.

Paws memory usage
1 direct reply — Read more / Contribute
by lschult2
on Nov 18, 2018 at 18:02
    Hello Monks, I'm starting to use Paws to access Amazon SES under mod_perl. But it's quite a memory hog. I'm still on prefork, and each httpd process is using a lot of extra memory due to Paws. There is a Paws->preload_service() call that I put in my mod_perl startup.pl file, but doing so does not change the shared memory usage for me.
    # startup.pl use Paws; Paws->preload_service('SES');
    Has anyone had success with keeping the memory usage of PAWS down?
match operator linear with PerlIO :mmap, exponential with Sys::Mmap
1 direct reply — Read more / Contribute
by daxim
on Nov 18, 2018 at 07:20
    input file `00`
    <87>Nov 18 09:43:43 rotechili.localdomain sudo[568]: pam_systemd(sudo: +session): Cannot create session: Already running in a session <30>Nov 18 09:43:45 rotechili.localdomain dbus-daemon[1270]: [system] +Successfully activated service 'org.freedesktop.locale1' <13>Nov 18 09:44:14 rotechili.localdomain [RPM][708]: Transaction ID 5 +bf1265e finished: 0 <86>Nov 18 09:44:19 rotechili.localdomain sudo[568]: pam_unix(sudo:ses +sion): session closed for user root
    duplicate it a bunch, takes 1 GB altogether
    cat 00 00 > 01 cat 01 01 > 02 cat 02 02 > 03 cat 03 03 > 04 cat 04 04 > 05 cat 05 05 > 06 cat 06 06 > 07 cat 07 07 > 08 cat 08 08 > 09 cat 09 09 > 10 cat 10 10 > 11 cat 11 11 > 12 cat 12 12 > 13 cat 13 13 > 14 cat 14 14 > 15 cat 15 15 > 16 cat 16 16 > 17 cat 17 17 > 18 cat 18 18 > 19 cat 19 19 > 20
    the code, file `logparser`
    use 5.028; use strictures; use autodie; use Sys::Mmap qw(mmap PROT_READ MAP_SHARED); my ($approach, $file) = @ARGV; my $str; if ('perlio' eq $approach) { open my $fh, '<:mmap', $file; local $/; $str = readline $fh; } else { open my $fh, '<', $file; mmap($str, 0, PROT_READ, MAP_SHARED, $fh) or die "mmap: $!"; }; my $mon = join '|', qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec +); my $pattern = qr" ^ <(?'pri' \d{1,3} )> (?'mon' $mon ) [ ] (?'day' (?: [ ]\d | \d\d ) ) [ ] (?'time' \d\d:\d\d:\d\d ) [ ] (?'host' [^ ]+ ) [ ] (?'msg' [^\n]+ ) $ "amosx; while ($str =~ /$pattern/g) { () = %+; # do something useful with the results };
    linear run-time with PerlIO :mmap (when file size doubles, then run-time doubles)
    $ perl -E'for (10..20) { print "file $_: "; system "time perl logparse +r perlio $_" }' file 10: 0.06user 0.00system 0:00.07elapsed 98%CPU (0avgtext+0avgdata +11480maxresident)k 0inputs+0outputs (0major+1298minor)pagefaults 0swaps file 11: 0.09user 0.00system 0:00.10elapsed 100%CPU (0avgtext+0avgdata + 12444maxresident)k 0inputs+0outputs (0major+1422minor)pagefaults 0swaps file 12: 0.17user 0.00system 0:00.17elapsed 99%CPU (0avgtext+0avgdata +14264maxresident)k 0inputs+0outputs (0major+1662minor)pagefaults 0swaps file 13: 0.28user 0.01system 0:00.29elapsed 99%CPU (0avgtext+0avgdata +17800maxresident)k 0inputs+0outputs (0major+1636minor)pagefaults 0swaps file 14: 0.56user 0.00system 0:00.57elapsed 100%CPU (0avgtext+0avgdata + 25432maxresident)k 0inputs+0outputs (0major+1582minor)pagefaults 0swaps file 15: 1.03user 0.01system 0:01.05elapsed 99%CPU (0avgtext+0avgdata +39760maxresident)k 0inputs+0outputs (0major+3007minor)pagefaults 0swaps file 16: 2.10user 0.02system 0:02.13elapsed 99%CPU (0avgtext+0avgdata +68880maxresident)k 0inputs+0outputs (0major+6871minor)pagefaults 0swaps file 17: 4.25user 0.05system 0:04.31elapsed 99%CPU (0avgtext+0avgdata +127220maxresident)k 0inputs+0outputs (0major+14606minor)pagefaults 0swaps file 18: 8.26user 0.09system 0:08.37elapsed 99%CPU (0avgtext+0avgdata +243520maxresident)k 0inputs+0outputs (0major+29051minor)pagefaults 0swaps file 19: 16.27user 0.15system 0:16.43elapsed 99%CPU (0avgtext+0avgdata + 476608maxresident)k 0inputs+0outputs (0major+59994minor)pagefaults 0swaps file 20: 32.82user 0.22system 0:33.08elapsed 99%CPU (0avgtext+0avgdata + 942436maxresident)k 0inputs+0outputs (0major+121878minor)pagefaults 0swaps
    exponential run-time with Sys::Mmap
    $ perl -E'for (10..20) { print "file $_: "; system "time perl logparse +r sysmmap $_" }' file 10: 0.16user 0.00system 0:00.16elapsed 99%CPU (0avgtext+0avgdata +12060maxresident)k 0inputs+0outputs (0major+1406minor)pagefaults 0swaps file 11: 1.44user 0.01system 0:01.45elapsed 99%CPU (0avgtext+0avgdata +12700maxresident)k 0inputs+0outputs (0major+1635minor)pagefaults 0swaps file 12: 4.68user 0.00system 0:04.69elapsed 99%CPU (0avgtext+0avgdata +14744maxresident)k 0inputs+0outputs (0major+2108minor)pagefaults 0swaps file 13: 24.50user 0.01system 0:24.56elapsed 99%CPU (0avgtext+0avgdata + 18164maxresident)k 0inputs+0outputs (0major+2025minor)pagefaults 0swaps file 14: 96.97user 0.02system 1:37.10elapsed 99%CPU (0avgtext+0avgdata + 25456maxresident)k 0inputs+0outputs (0major+2381minor)pagefaults 0swaps file 15: ^Z
    Can you speculate why I get these results? Am I using the variant with :mmap correctly?
HTTPS communication
1 direct reply — Read more / Contribute
by harangzsolt33
on Nov 17, 2018 at 21:42
    I have never had a website that had any sort of security layer, and I am not sure how to set it up, how to pay for it, or how to incoroprate it with Perl. For example, if I move my website from http to https, does that mean my perl scripts will continue to run just like before? I mean if I print something to stdout, does it automatically go through a security filter that encrypts it, or do I have to use some kind of Perl module to encrypt my script's output?

    Also, when I am reading input from stdin (form submission), do I just read the values from STDIN, or am I required to use a perl module to decrypt whatever is being read?

    Keywords: secure connection, authentication, server, encryption, insecure, vulnerable, expose data, password, issue SSL certificate

making tcl.pm and Tcl movable
1 direct reply — Read more / Contribute
by Anonymous Monk
on Nov 17, 2018 at 11:30

    Hi

    I have been asked to install tcl.pm in order to be hard linked to a specific installation so that everything can be moved without tcl.pm loosing sight of Tcl. Linking to a specific Tcl installation is easily achievable by using: perl Makefile.PL --tclconfig /opt/local/lib/tclConfig.sh as pointed out in several forums. However, this doesn't make it 'movable'. I do not think it is possible to install tcl.pm to make it 'movable', even if in the POD the author seems to indicate this. I guess I should work with some ENV variables, for example like in tkx.pm using something like $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;, for example at BEGIN time. But some mechanism like this seems not to exist in tcl.pm. Any ideas that I could explore?

    Flo.

Modules in Windows
2 direct replies — Read more / Contribute
by kepler
on Nov 17, 2018 at 10:37

    Hi

    I have perl installed in my Windows 7, 64 bits, and it runs great. I also have no problem regarding adding new modules, even from cpan. However, when for some reason the module needs some kind of compilation (I think) I get a "build not ok" at the end. So the c:\perl\bin\perl.exe ./BUILD.pl fails. That is, the modules fails in the compilation of the C code probably. Does anyone knows how to fix this?

    Best regards

Installattio of LWP::Protocol::https stuck on sslecho.t test
1 direct reply — Read more / Contribute
by Anonymous Monk
on Nov 17, 2018 at 05:48
    My Perl knowledge is limited so I hope this is not too trivial:

    To get a program to run, I'm trying to install LWP::Protocol::https from CPAN. I've simply started sudo cpan and then invoked install LWP::Protocol::https. However, this gets stuck (seemingly) forever while running t/local/07_sslecho.t, even if I select no when it prompts me whether I want to run external tests and despite my Internet connection working fine (not sure if this specific test even communicates with some external server).

    On my system uname -r returns 4.18.10-arch1-1-ARCH and I have gcc 8.2.1 installed. Right before the test runs some C compilation warnings are displayed, maybe this is due to some version conflict with a openssl? (I have OpenSSL 1.1.1  11 Sep 2018 installed). I've appended the warnings below.

    cc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-a +liasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEF +ILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic -O2 -p +ipe -fstack-protector-strong -fno-plt -DVERSION=\"1.85\" -DXS_VERSI +ON=\"1.85\" -fPIC "-I/usr/lib/perl5/5.28/core_perl/CORE" SSLeay.c SSLeay.xs: In function ‘XS_Net__SSLeay_CTX_tlsv1_new’: SSLeay.xs:1808:6: warning: ‘TLSv1_method’ is deprecated [-Wdeprecated- +declarations] RETVAL = SSL_CTX_new (TLSv1_method()); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1852:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* TL +Sv1.0 */ ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_CTX_tlsv1_1_new’: SSLeay.xs:1817:6: warning: ‘TLSv1_1_method’ is deprecated [-Wdeprecate +d-declarations] RETVAL = SSL_CTX_new (TLSv1_1_method()); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1858:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* +TLSv1.1 */ ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_CTX_tlsv1_2_new’: SSLeay.xs:1828:6: warning: ‘TLSv1_2_method’ is deprecated [-Wdeprecate +d-declarations] RETVAL = SSL_CTX_new (TLSv1_2_method()); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1864:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* +TLSv1.2 */ ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_RAND_pseudo_bytes’: SSLeay.xs:2707:9: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprec +ated-declarations] rc = RAND_pseudo_bytes(random, num); ^~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/rand.h:44:1: note: declared here DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num) +) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_X509_CRL_get_lastUpdate’: SSLeay.c:6248:2: warning: ‘X509_CRL_get_lastUpdate’ is deprecated [-Wd +eprecated-declarations] RETVAL = X509_CRL_get_lastUpdate(x); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/x509.h:727:1: note: declared here DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl)) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_X509_CRL_get_nextUpdate’: SSLeay.c:6267:2: warning: ‘X509_CRL_get_nextUpdate’ is deprecated [-Wd +eprecated-declarations] RETVAL = X509_CRL_get_nextUpdate(x); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/x509.h:728:1: note: declared here DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl)) ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_X509_get_subjectAltNames’: SSLeay.xs:3410:26: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprec +ated-declarations] PUSHs(sv_2mortal(newSVpv((const char*)ASN1_S +TRING_data(subjAltNameDN->d.otherName->value->value.utf8string), ASN1 +_STRING_length(subjAltNameDN->d.otherName->value->value.utf8string))) +); ^~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/asn1.h:554:1: note: declared here DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) ^~~~~~~~~~~~~~~~~~ SSLeay.xs:3419:26: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprec +ated-declarations] PUSHs(sv_2mortal(newSVpv((const char*)ASN1_S +TRING_data(subjAltNameDN->d.ia5), ASN1_STRING_length(subjAltNameDN->d +.ia5)))); ^~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/asn1.h:554:1: note: declared here DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_P_X509_get_crl_distribution_poi +nts’: SSLeay.xs:3470:25: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprec +ated-declarations] XPUSHs(sv_2mortal(newSVpv((char*)ASN1_STRING_ +data(gn->d.ia5),ASN1_STRING_length(gn->d.ia5)))); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/asn1.h:554:1: note: declared here DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_P_X509_get_ocsp_uri’: SSLeay.xs:3511:3: warning: ‘ASN1_STRING_data’ is deprecated [-Wdepreca +ted-declarations] XPUSHs(sv_2mortal(newSVpv( ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/asn1.h:554:1: note: declared here DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_P_ASN1_STRING_get’: SSLeay.xs:3829:9: warning: ‘ASN1_STRING_data’ is deprecated [-Wdepreca +ted-declarations] u8 = newSVpv((const char*)ASN1_STRING_data(s), ASN1_STRING_le +ngth(s)); ^~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/asn1.h:554:1: note: declared here DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_method’: SSLeay.c:9279:2: warning: ‘TLSv1_method’ is deprecated [-Wdeprecated-d +eclarations] RETVAL = TLSv1_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1852:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* TL +Sv1.0 */ ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_server_method’: SSLeay.c:9296:2: warning: ‘TLSv1_server_method’ is deprecated [-Wdepre +cated-declarations] RETVAL = TLSv1_server_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1853:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void) +) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_client_method’: SSLeay.c:9313:2: warning: ‘TLSv1_client_method’ is deprecated [-Wdepre +cated-declarations] RETVAL = TLSv1_client_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1854:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void) +) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_1_method’: SSLeay.c:9333:2: warning: ‘TLSv1_1_method’ is deprecated [-Wdeprecated +-declarations] RETVAL = TLSv1_1_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1858:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* +TLSv1.1 */ ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_1_server_method’: SSLeay.c:9350:2: warning: ‘TLSv1_1_server_method’ is deprecated [-Wdep +recated-declarations] RETVAL = TLSv1_1_server_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1859:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(voi +d)) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_1_client_method’: SSLeay.c:9367:2: warning: ‘TLSv1_1_client_method’ is deprecated [-Wdep +recated-declarations] RETVAL = TLSv1_1_client_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1860:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(voi +d)) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_2_method’: SSLeay.c:9388:2: warning: ‘TLSv1_2_method’ is deprecated [-Wdeprecated +-declarations] RETVAL = TLSv1_2_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1864:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* +TLSv1.2 */ ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_2_server_method’: SSLeay.c:9405:2: warning: ‘TLSv1_2_server_method’ is deprecated [-Wdep +recated-declarations] RETVAL = TLSv1_2_server_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1865:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(voi +d)) ^~~~~~~~~~~~~~~~~~ SSLeay.c: In function ‘XS_Net__SSLeay_TLSv1_2_client_method’: SSLeay.c:9422:2: warning: ‘TLSv1_2_client_method’ is deprecated [-Wdep +recated-declarations] RETVAL = TLSv1_2_client_method(); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/ssl.h:1866:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(voi +d)) ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_RSA_generate_key’: SSLeay.xs:5443:9: warning: ‘RSA_generate_key’ is deprecated [-Wdepreca +ted-declarations] RETVAL = RSA_generate_key(bits, e, ssleay_RSA_generate_key_cb +_invoke, cb); ^~~~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from SSLeay.xs:163: /usr/include/openssl/rsa.h:234:1: note: declared here DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, v +oid ^~~~~~~~~~~~~~~~~~ SSLeay.xs: In function ‘XS_Net__SSLeay_OCSP_response_results’: SSLeay.xs:6781:33: warning: passing argument 1 of ‘i2d_OCSP_CERTID’ di +scards ‘const’ qualifier from pointer target type [-Wdiscarded-qualif +iers] int len = i2d_OCSP_CERTID(OCSP_SINGLERESP_get0_id(sir),NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/openssl/objects.h:15, from /usr/include/openssl/evp.h:28, from /usr/include/openssl/x509.h:18, from /usr/include/openssl/ssl.h:20, from SSLeay.xs:167: /usr/include/openssl/ocsp.h:333:1: note: expected ‘OCSP_CERTID *’ {aka + ‘struct ocsp_cert_id_st *’} but argument is of type ‘const OCSP_CERT +ID *’ {aka ‘const struct ocsp_cert_id_st *’} DECLARE_ASN1_FUNCTIONS(OCSP_CERTID) ^ SSLeay.xs:6790:23: warning: passing argument 1 of ‘i2d_OCSP_CERTID’ di +scards ‘const’ qualifier from pointer target type [-Wdiscarded-qualif +iers] i2d_OCSP_CERTID(OCSP_SINGLERESP_get0_id(sir),&pi); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/openssl/objects.h:15, from /usr/include/openssl/evp.h:28, from /usr/include/openssl/x509.h:18, from /usr/include/openssl/ssl.h:20, from SSLeay.xs:167: /usr/include/openssl/ocsp.h:333:1: note: expected ‘OCSP_CERTID *’ {aka + ‘struct ocsp_cert_id_st *’} but argument is of type ‘const OCSP_CERT +ID *’ {aka ‘const struct ocsp_cert_id_st *’} DECLARE_ASN1_FUNCTIONS(OCSP_CERTID)
Sane deprecation policy for a CPAN module?
5 direct replies — Read more / Contribute
by Dallaylaen
on Nov 17, 2018 at 05:45

    Hello esteemed monks,

    Say I have a CPAN module and I found out that its behavior is not exactly optimal. So I would like to change it, but there may be users out there! How do I change my module before backward compatibility locks me into my bad decisions? And what modules should I look into that do the right thing (tm)?

    My current policy is to keep old behavior with a deprecated warning for 5 releases (not including the bugfix), but I guess that's not the best I can do.

    Thank you.

With perl5.26 getting threads.so: undefined symbol: PL_thr_key
2 direct replies — Read more / Contribute
by Anonymous Monk
on Nov 17, 2018 at 03:08

    I am porting STAF based perl services to new perl version. When trying to load threads in thread modules, getting error

    threads.so: undefined symbol: PL_thr_key at /opt/ActivePerl-5.26/lib/XSLoader.pm

    I saw some post which says this occurs if perl is not threaded. However, I have installed threaded perl downloaded from Active State. version is perl 5.26.1

    Any clue to solve this?
finding colunm header which crossing multiple rows
3 direct replies — Read more / Contribute
by cscu2007
on Nov 16, 2018 at 13:40

    -------------------------------------------------------------------------------------------

    Name       Company                Work                       Home                       Work

                      Name                     Address                   Phone                       Hours

                                                                                    Number

    -------------------------------------------------------------------------------------------


    John       ABC                          MAIN_STREET         987.111.4567            8

    Bob         CNN                         2nd_Street                875.444.3425            2


    I can build a hash table for the contents, but trouble is with the header. I need to find out how to get the column number based on above header, to extract the corresponding values per column. The reason to do this, because the header is dynamic, including orders, but for the same column, the header is always formated as aligned (first letter across multiple rows, as above).


    For example, I need to find out which column of "Work Address" from header, then I can grep the corresponding column from the table contents.


    Thanks in advance for the help!


Add your question
Title:
Your question:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":


  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.