perl.beginners https://www.nntp.perl.org/group/perl.beginners/ ... Copyright 1998-2020 perl.org Fri, 07 Aug 2020 13:12:49 +0000 ask@perl.org Re: Where do messages sent with syslog go when there is only ajournal? by hw On Tuesday, May 19, 2020 6:37:41 PM CEST Andy Bach wrote:<br/>&gt; Huh, news to me:<br/>&gt; https://www.loggly.com/ultimate-guide/using-journalctl/<br/>&gt; <br/>&gt; cpan shows at least 5 modules for handling journald stuff, Log::Journald<br/>&gt; shows<br/>&gt; use Log::Journald;<br/>&gt; use Sys::Syslog qw/:macros/;<br/>&gt; <br/>&gt; # Easy.<br/>&gt; journal_log(LOG_INFO, &quot;Hello (1) from PID $$!&quot;);<br/>&gt; <br/>&gt; # Send arbitrary fields, even binary data<br/>&gt; Log::Journald::send(PRIORITY =&gt; LOG_INFO,<br/>&gt; MESSAGE =&gt; &quot;Hello (2) from PID $$!&quot;,<br/>&gt; PERL_PACKAGE =&gt; __PACKAGE__,<br/>&gt; _YOLO =&gt; &quot;SW\x00AG&quot;)<br/>&gt; or warn &quot;Could not send log: $!&quot;;<br/>&gt; <br/>&gt; # Raw<br/>&gt; Log::Journald::sendv(&#39;PRIORITY=6&#39;,<br/>&gt; &quot;MESSAGE=Hello (3) from PID $$!&quot;);<br/>&gt; <br/><br/>Well ... I was looking at search results from dnf in Fedora 32 ... I rather <br/>use packages from package management because otherwise, you need to keep track <br/>of updates yourself. After a while, you have so much unincluded software on <br/>so many different machines that you loose track of things.<br/><br/>And what do you do when you need your program to be able to run on different <br/>distributions some of which use syslog, some of which have only a journal and <br/>some of which have both?<br/><br/>(The journal is a retarded idea and I hate it and never use it. That doesn&#39;t <br/>mean I don&#39;t want the logging to go wrong.)<br/> https://www.nntp.perl.org/group/perl.beginners/2020/05/msg127330.html Thu, 28 May 2020 13:13:12 +0000 Re: Where do messages sent with syslog go when there is only ajournal? by Andy Bach Huh, news to me:<br/>https://www.loggly.com/ultimate-guide/using-journalctl/<br/><br/>cpan shows at least 5 modules for handling journald stuff, Log::Journald<br/>shows<br/>use Log::Journald;<br/>use Sys::Syslog qw/:macros/;<br/><br/># Easy.<br/>journal_log(LOG_INFO, &quot;Hello (1) from PID $$!&quot;);<br/><br/># Send arbitrary fields, even binary data<br/>Log::Journald::send(PRIORITY =&gt; LOG_INFO,<br/> MESSAGE =&gt; &quot;Hello (2) from PID $$!&quot;,<br/> PERL_PACKAGE =&gt; __PACKAGE__,<br/> _YOLO =&gt; &quot;SW\x00AG&quot;)<br/> or warn &quot;Could not send log: $!&quot;;<br/><br/># Raw<br/>Log::Journald::sendv(&#39;PRIORITY=6&#39;,<br/> &quot;MESSAGE=Hello (3) from PID $$!&quot;);<br/><br/>On Mon, May 18, 2020 at 6:41 AM hw &lt;hw@adminart.net&gt; wrote:<br/><br/>&gt; Hi,<br/>&gt;<br/>&gt; where do messages sent with syslog go when there is only a journal? When<br/>&gt; using Sys::Syslog, there don&#39;t seem to be any messages in the journal.<br/>&gt;<br/>&gt; Does Sys::Syslog need to updated?<br/>&gt;<br/>&gt; --<br/>&gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt; http://learn.perl.org/<br/>&gt;<br/>&gt;<br/>&gt;<br/><br/>-- <br/><br/>a<br/><br/>Andy Bach,<br/>afbach@gmail.com<br/>608 658-1890 cell<br/>608 261-5738 wk<br/> https://www.nntp.perl.org/group/perl.beginners/2020/05/msg127329.html Tue, 19 May 2020 16:37:59 +0000 Re: Where do messages sent with syslog go when there is only ajournal? by Leam Hall Hopefully they don&#39;t make it systemd only. Some of us still use <br/>non-systemd systems. :)<br/><br/>Leam<br/><br/>On 5/15/20 3:03 AM, hw wrote:<br/>&gt; Hi,<br/>&gt; <br/>&gt; where do messages sent with syslog go when there is only a journal? When<br/>&gt; using Sys::Syslog, there don&#39;t seem to be any messages in the journal.<br/>&gt; <br/>&gt; Does Sys::Syslog need to updated?<br/>&gt; <br/> https://www.nntp.perl.org/group/perl.beginners/2020/05/msg127328.html Mon, 18 May 2020 13:31:58 +0000 Where do messages sent with syslog go when there is only a journal? by hw Hi,<br/><br/>where do messages sent with syslog go when there is only a journal? When <br/>using Sys::Syslog, there don&#39;t seem to be any messages in the journal.<br/><br/>Does Sys::Syslog need to updated?<br/> https://www.nntp.perl.org/group/perl.beginners/2020/05/msg127327.html Mon, 18 May 2020 11:41:23 +0000 Re: Error when using the executable perl in client machine by Manikandan Narayan Hi Mike<br/>Thanks for your email and the and sharing more details, I will check out.<br/><br/>Once again Thanks<br/><br/>Regards,<br/>Narayan<br/><br/>&lt;https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;<br/>Virus-free.<br/>www.avast.com<br/>&lt;https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;<br/>&lt;#m_8364011968521704717_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2&gt;<br/><br/>On Sat, Apr 25, 2020 at 7:05 AM Mike &lt;temp4@mflan.com&gt; wrote:<br/><br/>&gt;<br/>&gt; Hi Manikandan,<br/>&gt;<br/>&gt; I just received this response on the PAR list:<br/>&gt;<br/>&gt;<br/>&gt; -------- Forwarded Message --------<br/>&gt; Subject: Re: Par with strawberry-Perl<br/>&gt; Date: Sat, 25 Apr 2020 09:44:13 +1000<br/>&gt; From: Shawn Laffan &lt;shawnlaffan@gmail.com&gt; &lt;shawnlaffan@gmail.com&gt;<br/>&gt; To: Mike Flannigan &lt;mikeflan@att.net&gt; &lt;mikeflan@att.net&gt;<br/>&gt; CC: par@perl.org &lt;par@perl.org&gt; &lt;par@perl.org&gt;<br/>&gt;<br/>&gt; Hello Mike,<br/>&gt;<br/>&gt; There are likely missing DLLs that need to be added to the pp call using<br/>&gt; the --link option.<br/>&gt;<br/>&gt; Finding these manually can be a pain, so have a look at pp_autolink or<br/>&gt; pp_simple (the former is mine, but adapted from the latter).<br/>&gt;<br/>&gt; https://github.com/shawnlaffan/perl-pp-autolink<br/>&gt; https://www.perlmonks.org/?node_id=1148802<br/>&gt;<br/>&gt; Shawn.<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; On 4/17/20 12:00 PM, Manikandan Narayan wrote:<br/>&gt;<br/>&gt; Hi We are using strawberry-perl<br/>&gt;<br/>&gt; Error when using the executable perl in client machine that does not have<br/>&gt; strawberry-perl in it<br/>&gt;<br/>&gt; Can&#39;t load<br/>&gt; &#39;C:\Users\Nuser\AppData\Local\Temp\par-30303030313137\cache-3610486<br/>&gt; 8c73148db1c60163c6ec837fe6a3b7c0d\9c557319.xs.dll&#39; for module Net::SSH2:<br/>&gt; load_file:The specified module could not be found at<br/>&gt; &lt;embedded&gt;/DynaLoader.pm line 193.<br/>&gt; at &lt;embedded&gt;/PAR/Heavy.pm line 140.<br/>&gt; Compilation failed in require at C:\Users\<br/>&gt; Nuser\AppData\Local\Temp\par-3030303<br/>&gt;<br/>&gt; 0313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/<br/>&gt; Backend/Net_SSH2.pm line 15.<br/>&gt; BEGIN failed--compilation aborted at C:\Users\ Nuser<br/>&gt; \AppData\Local\Temp\par-30303030313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/Backend/Net_SSH2.pm<br/>&gt; line 15.<br/>&gt; Compilation failed in require at script/SFTPdownload.pl line 13.<br/>&gt; BEGIN failed--compilation aborted at script/SFTPdownload.pl line 13.<br/>&gt;<br/>&gt; Any Help will be highly appreciated.<br/>&gt;<br/>&gt; Regards,<br/>&gt; Narayan<br/>&gt;<br/>&gt;<br/>&gt;<br/>&lt;https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;<br/>Virus-free.<br/>www.avast.com<br/>&lt;https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;<br/>&lt;#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2&gt;<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127326.html Sun, 26 Apr 2020 10:24:15 +0000 Re: Error when using the executable perl in client machine by Mike <br/>Hi Manikandan, <br/> <br/>I just received this response on the PAR list: <br/> <br/> <br/>-------- Forwarded Message -------- <br/>Subject: Re: Par with strawberry-Perl <br/>Date: Sat, 25 Apr 2020 09:44:13 +1000 <br/>From: Shawn Laffan &lt;shawnlaffan@gmail.com&gt; <br/>To: Mike Flannigan &lt;mikeflan@att.net&gt; <br/>CC: par@perl.org &lt;par@perl.org&gt; <br/> <br/> <br/> <br/>Hello Mike, <br/> <br/>There are likely missing DLLs that need to be added to the pp call using <br/>the --link option. <br/> <br/>Finding these manually can be a pain, so have a look at pp_autolink or <br/>pp_simple (the former is mine, but adapted from the latter). <br/> <br/>https://github.com/shawnlaffan/perl-pp-autolink <br/>https://www.perlmonks.org/?node_id=1148802 <br/> <br/>Shawn. <br/> <br/> <br/> <br/> <br/> <br/>On 4/17/20 12:00 PM, Manikandan Narayan wrote: <br/>&gt; Hi We are using strawberry-perl <br/>&gt; <br/>&gt; Error when using the executable perl in client machine that does not <br/>&gt; have strawberry-perl in it <br/>&gt; <br/>&gt; Can&#39;t load <br/>&gt; &#39;C:\Users\Nuser\AppData\Local\Temp\par-30303030313137\cache-3610486 <br/>&gt; 8c73148db1c60163c6ec837fe6a3b7c0d\9c557319.xs.dll&#39; for module <br/>&gt; Net::SSH2: load_file:The specified module could not be found at <br/>&gt; &lt;embedded&gt;/DynaLoader.pm line 193. <br/>&gt; &nbsp; at &lt;embedded&gt;/PAR/Heavy.pm line 140. <br/>&gt; Compilation failed in require at C:\Users\ <br/>&gt; Nuser\AppData\Local\Temp\par-3030303 <br/>&gt; 0313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/ <br/>&gt; Backend/Net_SSH2.pm line 15. <br/>&gt; BEGIN failed--compilation aborted at C:\Users\ Nuser <br/>&gt; \AppData\Local\Temp\par-30303030313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/Backend/Net_SSH2.pm <br/>&gt; line 15. <br/>&gt; Compilation failed in require at script/SFTPdownload.pl line 13. <br/>&gt; BEGIN failed--compilation aborted at script/SFTPdownload.pl line 13. <br/>&gt; <br/>&gt; Any Help will be highly appreciated. <br/>&gt; <br/>&gt; Regards, <br/>&gt; Narayan <br/> <br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127325.html Sat, 25 Apr 2020 01:57:05 +0000 Re: Help with REST API interaction. by Gil Magno Hi Francisco, <br/> <br/>2020-04-22 11:21:31 -0300 Francisco Acu&ntilde;a: <br/>&gt; Good day, I&#39;ve been getting familiarized with Perl for the last couple of <br/>&gt; days due to a RT integration project I&#39;ve been handed. I&#39;ve also been doing <br/>&gt; a lot of research and a lot of asking around in forums for pointers on how <br/>&gt; to properly achieve this. <br/>&gt; <br/>&gt; I&#39;m glad to say that I managed to get all my basic scrips up and running, <br/>&gt; retrieving all the values I needed and updating all the fields I wanted to <br/>&gt; update. I now need to get to the part of actually interacting with the <br/>&gt; external RESTful API. <br/>&gt; <br/>&gt; If what I understood from my research is correct, I will be working with <br/>&gt; the REST::Client and JSON modules. And what I need to do is: <br/>&gt; <br/>&gt; 1. Encode the values I want to pass over to the API into a JSON object. <br/>&gt; 2. Do some coding on the other side in order to achieve my desired <br/>&gt; funcionalities and pass some values back to RT (for this I won&#39;t need your <br/>&gt; help since the coding won&#39;t be done in Perl, sadly) <br/>&gt; 3. Decode the response I get back to Perl and use those values in RT to <br/>&gt; do some more updating. <br/>&gt; <br/>&gt; I would greatly appreciate if you could provide me with some pointers and <br/>&gt; code examples of this being done. Choosing the values I need to pass, <br/>&gt; encoding them, passing them over to the API, and then decoding the response. <br/>&gt; <br/>&gt; Needless to say, I am documenting all my work and will gladly share my <br/>&gt; experience in this project and all the coding work in any forum. <br/> <br/>One way to do it is like this: <br/> <br/>use strict; <br/>use warnings; <br/>use feature &#39;say&#39;; <br/>use LWP::UserAgent; <br/>use JSON; <br/> <br/>my $ua = LWP::UserAgent-&gt;new; <br/>my $uri = &#39;https://example.com/path/to/something&#39;; <br/>my %headers = (&#39;Content-Type&#39; =&gt; &#39;application/json&#39;); <br/> <br/># here are the values to pass to the API <br/>my %values = (number =&gt; 1, name =&gt; &#39;etc&#39;); <br/> <br/>my $res = $ua-&gt;post( <br/> $uri, <br/> %headers, <br/> Content =&gt; JSON::encode_json(\%values) <br/>); <br/> <br/>if ($ua-&gt;is_success) { <br/> # if you&#39;re receiving a JSON <br/> my $data = JSON::decode_json $res-&gt;content; <br/> # now $data is a Perl data structure; it&#39;s the decoded JSON <br/> <br/> # but if you&#39;re receiving (say) HTML <br/> say $res-&gt;decoded_content; <br/>} <br/>else { <br/> # handle errors here <br/>} <br/> <br/>See these docs for the modules&#39; details: <br/>https://metacpan.org/pod/LWP::UserAgent <br/>https://metacpan.org/pod/JSON <br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127324.html Fri, 24 Apr 2020 23:01:21 +0000 Re: Help with REST API interaction. by Gil Magno Correction: we should use $res-&gt;is_success in the &#39;if&#39; below, not<br/>$ua-&gt;is_success.<br/><br/>2020-04-24 19:42:32 -0300 Gil Magno:<br/>&gt; if ($ua-&gt;is_success) {<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127323.html Fri, 24 Apr 2020 22:48:10 +0000 Help with REST API interaction. by =?UTF-8?Q?Francisco_Acu=C3=B1a?= Good day, I&#39;ve been getting familiarized with Perl for the last couple of<br/>days due to a RT integration project I&#39;ve been handed. I&#39;ve also been doing<br/>a lot of research and a lot of asking around in forums for pointers on how<br/>to properly achieve this.<br/><br/>I&#39;m glad to say that I managed to get all my basic scrips up and running,<br/>retrieving all the values I needed and updating all the fields I wanted to<br/>update. I now need to get to the part of actually interacting with the<br/>external RESTful API.<br/><br/>If what I understood from my research is correct, I will be working with<br/>the REST::Client and JSON modules. And what I need to do is:<br/><br/> 1. Encode the values I want to pass over to the API into a JSON object.<br/> 2. Do some coding on the other side in order to achieve my desired<br/> funcionalities and pass some values back to RT (for this I won&#39;t need your<br/> help since the coding won&#39;t be done in Perl, sadly)<br/> 3. Decode the response I get back to Perl and use those values in RT to<br/> do some more updating.<br/><br/>I would greatly appreciate if you could provide me with some pointers and<br/>code examples of this being done. Choosing the values I need to pass,<br/>encoding them, passing them over to the API, and then decoding the response.<br/><br/>Needless to say, I am documenting all my work and will gladly share my<br/>experience in this project and all the coding work in any forum.<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127322.html Fri, 24 Apr 2020 21:52:06 +0000 Re: Error when using the executable perl in client machine by Manikandan Narayan Hi Rob<br/><br/>Thanks for your email<br/><br/>I will check the links provided by you<br/><br/>Mean while take care<br/><br/><br/>Narayan<br/><br/>On Mon, 20 Apr 2020, 18:08 sisyphus, &lt;sisyphus359@gmail.com&gt; wrote:<br/><br/>&gt; Hi,<br/>&gt; See if there&#39;s anything helpful in<br/>&gt; https://www.perlmonks.org/?node_id=1229476<br/>&gt;<br/>&gt; If not, try posting your question at<br/>&gt; https://www.perlmonks.org/?node=Seekers%20of%20Perl%20Wisdom<br/>&gt; (Just scroll down to the bottom of the page and you&#39;ll find the box you<br/>&gt; can fill in to ask your question.)<br/>&gt; Or try searching the perlmonks archive at<br/>&gt; https://www.perlmonks.org/?node=Super%20Search<br/>&gt;<br/>&gt; You might get better luck there. Apparently there&#39;s no-one here who is<br/>&gt; willing or able to help.<br/>&gt;<br/>&gt; I don&#39;t use PAR::Packer and have no interest in it.<br/>&gt;<br/>&gt; Cheers,<br/>&gt; Rob<br/>&gt;<br/>&gt; On Sat, Apr 18, 2020 at 3:01 AM Manikandan Narayan &lt;<br/>&gt; narayanmanikandan@gmail.com&gt; wrote:<br/>&gt;<br/>&gt;&gt; Hi We are using strawberry-perl<br/>&gt;&gt;<br/>&gt;&gt; Error when using the executable perl in client machine that does not have<br/>&gt;&gt; strawberry-perl in it<br/>&gt;&gt;<br/>&gt;&gt; Can&#39;t load<br/>&gt;&gt; &#39;C:\Users\Nuser\AppData\Local\Temp\par-30303030313137\cache-3610486<br/>&gt;&gt; 8c73148db1c60163c6ec837fe6a3b7c0d\9c557319.xs.dll&#39; for module Net::SSH2:<br/>&gt;&gt; load_file:The specified module could not be found at<br/>&gt;&gt; &lt;embedded&gt;/DynaLoader.pm line 193.<br/>&gt;&gt; at &lt;embedded&gt;/PAR/Heavy.pm line 140.<br/>&gt;&gt; Compilation failed in require at C:\Users\<br/>&gt;&gt; Nuser\AppData\Local\Temp\par-3030303<br/>&gt;&gt;<br/>&gt;&gt; 0313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/<br/>&gt;&gt; Backend/Net_SSH2.pm line 15.<br/>&gt;&gt; BEGIN failed--compilation aborted at C:\Users\ Nuser<br/>&gt;&gt; \AppData\Local\Temp\par-30303030313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/Backend/Net_SSH2.pm<br/>&gt;&gt; line 15.<br/>&gt;&gt; Compilation failed in require at script/SFTPdownload.pl line 13.<br/>&gt;&gt; BEGIN failed--compilation aborted at script/SFTPdownload.pl line 13.<br/>&gt;&gt;<br/>&gt;&gt; Any Help will be highly appreciated.<br/>&gt;&gt;<br/>&gt;&gt; Regards,<br/>&gt;&gt; Narayan<br/>&gt;&gt;<br/>&gt;<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127321.html Mon, 20 Apr 2020 13:57:49 +0000 Re: Error when using the executable perl in client machine by sisyphus Hi,<br/>See if there&#39;s anything helpful in<br/>https://www.perlmonks.org/?node_id=1229476<br/><br/>If not, try posting your question at<br/>https://www.perlmonks.org/?node=Seekers%20of%20Perl%20Wisdom<br/>(Just scroll down to the bottom of the page and you&#39;ll find the box you can<br/>fill in to ask your question.)<br/>Or try searching the perlmonks archive at<br/>https://www.perlmonks.org/?node=Super%20Search<br/><br/>You might get better luck there. Apparently there&#39;s no-one here who is<br/>willing or able to help.<br/><br/>I don&#39;t use PAR::Packer and have no interest in it.<br/><br/>Cheers,<br/>Rob<br/><br/>On Sat, Apr 18, 2020 at 3:01 AM Manikandan Narayan &lt;<br/>narayanmanikandan@gmail.com&gt; wrote:<br/><br/>&gt; Hi We are using strawberry-perl<br/>&gt;<br/>&gt; Error when using the executable perl in client machine that does not have<br/>&gt; strawberry-perl in it<br/>&gt;<br/>&gt; Can&#39;t load<br/>&gt; &#39;C:\Users\Nuser\AppData\Local\Temp\par-30303030313137\cache-3610486<br/>&gt; 8c73148db1c60163c6ec837fe6a3b7c0d\9c557319.xs.dll&#39; for module Net::SSH2:<br/>&gt; load_file:The specified module could not be found at<br/>&gt; &lt;embedded&gt;/DynaLoader.pm line 193.<br/>&gt; at &lt;embedded&gt;/PAR/Heavy.pm line 140.<br/>&gt; Compilation failed in require at C:\Users\<br/>&gt; Nuser\AppData\Local\Temp\par-3030303<br/>&gt;<br/>&gt; 0313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/<br/>&gt; Backend/Net_SSH2.pm line 15.<br/>&gt; BEGIN failed--compilation aborted at C:\Users\ Nuser<br/>&gt; \AppData\Local\Temp\par-30303030313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/Backend/Net_SSH2.pm<br/>&gt; line 15.<br/>&gt; Compilation failed in require at script/SFTPdownload.pl line 13.<br/>&gt; BEGIN failed--compilation aborted at script/SFTPdownload.pl line 13.<br/>&gt;<br/>&gt; Any Help will be highly appreciated.<br/>&gt;<br/>&gt; Regards,<br/>&gt; Narayan<br/>&gt;<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127320.html Mon, 20 Apr 2020 12:38:32 +0000 Error when using the executable perl in client machine by Manikandan Narayan Hi We are using strawberry-perl<br/><br/>Error when using the executable perl in client machine that does not have<br/>strawberry-perl in it<br/><br/>Can&#39;t load<br/>&#39;C:\Users\Nuser\AppData\Local\Temp\par-30303030313137\cache-3610486<br/>8c73148db1c60163c6ec837fe6a3b7c0d\9c557319.xs.dll&#39; for module Net::SSH2:<br/>load_file:The specified module could not be found at<br/>&lt;embedded&gt;/DynaLoader.pm line 193.<br/> at &lt;embedded&gt;/PAR/Heavy.pm line 140.<br/>Compilation failed in require at C:\Users\<br/>Nuser\AppData\Local\Temp\par-3030303<br/>0313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/<br/>Backend/Net_SSH2.pm line 15.<br/>BEGIN failed--compilation aborted at C:\Users\ Nuser<br/>\AppData\Local\Temp\par-30303030313137\cache-36104868c73148db1c60163c6ec837fe6a3b7c0d\inc\lib/Net/SFTP/Foreign/Backend/Net_SSH2.pm<br/>line 15.<br/>Compilation failed in require at script/SFTPdownload.pl line 13.<br/>BEGIN failed--compilation aborted at script/SFTPdownload.pl line 13.<br/><br/>Any Help will be highly appreciated.<br/><br/>Regards,<br/>Narayan<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127319.html Fri, 17 Apr 2020 17:01:07 +0000 Re: IO::Socket::Multicast::mcast_send by James Kerwin Ahhhh I managed to find the problem thanks to somebody else finding it late<br/>last year.<br/><br/>With the particular verison of Perl on the Pi (I think I said 5.28) there<br/>is a bug for the IO::Socket::Multicast module:<br/><br/>https://rt.cpan.org/Public/Bug/Display.html?id=130581<br/><br/>To fix it I went in to where the Multicast.pm file lives and implemented<br/>the suggested changes.<br/><br/>I know the correct thing to do was probably to make a local copy of the<br/>file and point to it, or switch to a younger version of Perl, but it&#39;s a<br/>personal project on a Pi that I&#39;m likely to wipe in a few months.<br/><br/>Script(s) work now!<br/><br/>Thanks for the help.<br/><br/>James<br/><br/><br/>On Sun, Apr 5, 2020 at 4:03 PM Shlomi Fish &lt;shlomif@shlomifish.org&gt; wrote:<br/><br/>&gt; Hi James,<br/>&gt;<br/>&gt; On Sun, 5 Apr 2020 14:58:26 +0100<br/>&gt; James Kerwin &lt;jkerwin2101@gmail.com&gt; wrote:<br/>&gt;<br/>&gt; &gt; Hi All,<br/>&gt; &gt;<br/>&gt; &gt; I&#39;m trying to connect to a smart bulb on my home WIFI using mcast_send<br/>&gt; &gt; in IO::Socket::Multicast.<br/>&gt; &gt;<br/>&gt; &gt; It works on my main Linux Mint laptop. The same script does not work on<br/>&gt; my<br/>&gt; &gt; Raspberry PI.<br/>&gt; &gt;<br/>&gt; &gt; Despite the script running as expected on one laptop I&#39;ve checked that<br/>&gt; this<br/>&gt; &gt; is all set up correctly:<br/>&gt; &gt;<br/>&gt; &gt; sub new {<br/>&gt; &gt; #my $class = shift;<br/>&gt; &gt; my $data = {<br/>&gt; &gt; address =&gt; &#39;239.255.255.250&#39;,<br/>&gt; &gt; port =&gt; 1982,<br/>&gt; &gt; timeout =&gt; 3,<br/>&gt; &gt; devices =&gt; [],<br/>&gt; &gt; };<br/>&gt; &gt; return bless( $data );<br/>&gt; &gt; }<br/>&gt; &gt;<br/>&gt;<br/>&gt; It is a good idea to use bless with an explicit package name or just use<br/>&gt; https://metacpan.org/pod/Moo or Moose or similar.<br/>&gt;<br/>&gt; &gt; my $socket = IO::Socket::Multicast-&gt;new(<br/>&gt; &gt; PeerAddr =&gt; $self-&gt;{address},<br/>&gt; &gt; PeerPort =&gt; $self-&gt;{port},<br/>&gt; &gt; Proto =&gt; &quot;udp&quot;,<br/>&gt; &gt; ReuseAddr =&gt; 1,<br/>&gt; &gt; ) or croak $!;<br/>&gt; &gt;<br/>&gt; &gt; But it&#39;s this part that fails on the PI:<br/>&gt; &gt;<br/>&gt;<br/>&gt; A few things to check:<br/>&gt;<br/>&gt; 1. Which OS/distro/version and perl version on both machines?<br/>&gt;<br/>&gt; 2. Does it happen with the latest stable perl installed from source?<br/>&gt;<br/>&gt; 3. Did you try using https://en.wikipedia.org/wiki/GDB and/or perl -d:<br/>&gt; https://perl-begin.org/topics/debugging/ ?<br/>&gt;<br/>&gt; 4. Is there anything in the rpi&#39;s firewall config?<br/>&gt;<br/>&gt; For more advice, see<br/>&gt; https://github.com/shlomif/writing-the-perfect-question .<br/>&gt;<br/>&gt; &gt; $socket-&gt;mcast_send( $query, &quot;$self-&gt;{address}:$self-&gt;{port}&quot; ) or croak<br/>&gt; $!;<br/>&gt; &gt;<br/>&gt; &gt; I&#39;ve checked that $socket, $query and $self-&gt;{address}:$self-&gt;{port}<br/>&gt; &gt; contain the info I expect and they do.<br/>&gt; &gt;<br/>&gt; &gt; On my Linux laptop I can use tcpdump and see the communication between<br/>&gt; &gt; laptop and bulb. Doing this on the Pi shows no communication. I&#39;ve<br/>&gt; replaced<br/>&gt; &gt; the &quot;croak&quot; with &quot;die &quot;zzzzzzzzzzzz&quot; so I can be certain it&#39;s failing at<br/>&gt; &gt; that point. I get the output &quot;zzzzzzzzzzzz&quot; (makes it easier to spot).<br/>&gt; &gt;<br/>&gt; &gt; I&#39;ve just used a command recently that allows me to access the specific<br/>&gt; ip<br/>&gt; &gt; and port of the lamp and it indicates the connection is successful. I&#39;m<br/>&gt; out<br/>&gt; &gt; of ideas and if anyone can advise I&#39;d appreciate it.<br/>&gt; &gt;<br/>&gt; &gt; Slightly (very) out of my depth when it comes to ports and IPs etc.<br/>&gt; &gt;<br/>&gt; &gt; Thanks,<br/>&gt; &gt; James<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; --<br/>&gt;<br/>&gt; Shlomi Fish https://www.shlomifish.org/<br/>&gt; https://github.com/shlomif/validate-your-html - Validate Your HTML<br/>&gt;<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127318.html Sun, 05 Apr 2020 18:05:27 +0000 Re: IO::Socket::Multicast::mcast_send by James Kerwin Hi thanks for the response.<br/><br/>Before I continue, at the top of the script I first borrowed for this it<br/>had &quot;use 5.026;&quot;. When I remove this and then alter any &quot;say&quot; or &quot;break&quot;<br/>etc that appear the scripts continue to work as before; Mint laptop works,<br/>Pi does not.<br/><br/>1) For PI:<br/>Pi Raspbian GNU/Linux 10 (buster).<br/>Perl Version: v5.28.1 (installed with OS).<br/><br/>ufw is not installed. I don&#39;t THINK any other firewalls are installed. I<br/>haven&#39;t installed any and I don&#39;t think there&#39;s one by default. This was a<br/>fresh install of Rasbpian done just this week.<br/><br/>Looking at iptables:<br/>$ sudo iptables -L -nv<br/>Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br/> pkts bytes target prot opt in out source<br/>destination<br/><br/>Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)<br/> pkts bytes target prot opt in out source<br/>destination<br/><br/>Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br/> pkts bytes target prot opt in out source<br/>destination<br/><br/>For Linux:<br/>Linux Mint 18 (Sarah)<br/>Perl: v5.26.0 (switched using perlbrew if memory serves me correctly. Some<br/>modules wouldn&#39;t install due to the Perl version that came with the OS).<br/><br/>ufw is disabled. When I activate it the script does not work, but it<br/>doesn&#39;t give an error pointing at the line where $socket-&gt;mcast_send is<br/>called, as it does on the pi.<br/><br/>iptables gives a massive output.<br/><br/>2) I have not tried it with the latest stable version of Perl, partly<br/>because I have several different versions of Perl where it does/doesn&#39;t<br/>work and I&#39;d mentally ruled out the Perl version. For example it doesn&#39;t<br/>work with the Perl on my Windows laptop, but doesn&#39;t give an error so my<br/>suspicion there is it&#39;s something firewall related.<br/><br/>3) I will check out those links. I&#39;ve just quickly looked through the<br/>script on the laptop with the debugger. I&#39;ll go check with the pi when I<br/>can get back on it (plugged in to TV, Tv in use).<br/><br/>4) Mentioned this in 1.<br/><br/>I&#39;ll keep at it for now, and keep trying things. I am able to identify the<br/>bulb when I log into the router and can directly ping the ip from the<br/>laptop and pi.<br/><br/>Thanks,<br/>James<br/><br/>On Sun, Apr 5, 2020 at 4:03 PM Shlomi Fish &lt;shlomif@shlomifish.org&gt; wrote:<br/><br/>&gt; Hi James,<br/>&gt;<br/>&gt; On Sun, 5 Apr 2020 14:58:26 +0100<br/>&gt; James Kerwin &lt;jkerwin2101@gmail.com&gt; wrote:<br/>&gt;<br/>&gt; &gt; Hi All,<br/>&gt; &gt;<br/>&gt; &gt; I&#39;m trying to connect to a smart bulb on my home WIFI using mcast_send<br/>&gt; &gt; in IO::Socket::Multicast.<br/>&gt; &gt;<br/>&gt; &gt; It works on my main Linux Mint laptop. The same script does not work on<br/>&gt; my<br/>&gt; &gt; Raspberry PI.<br/>&gt; &gt;<br/>&gt; &gt; Despite the script running as expected on one laptop I&#39;ve checked that<br/>&gt; this<br/>&gt; &gt; is all set up correctly:<br/>&gt; &gt;<br/>&gt; &gt; sub new {<br/>&gt; &gt; #my $class = shift;<br/>&gt; &gt; my $data = {<br/>&gt; &gt; address =&gt; &#39;239.255.255.250&#39;,<br/>&gt; &gt; port =&gt; 1982,<br/>&gt; &gt; timeout =&gt; 3,<br/>&gt; &gt; devices =&gt; [],<br/>&gt; &gt; };<br/>&gt; &gt; return bless( $data );<br/>&gt; &gt; }<br/>&gt; &gt;<br/>&gt;<br/>&gt; It is a good idea to use bless with an explicit package name or just use<br/>&gt; https://metacpan.org/pod/Moo or Moose or similar.<br/>&gt;<br/>&gt; &gt; my $socket = IO::Socket::Multicast-&gt;new(<br/>&gt; &gt; PeerAddr =&gt; $self-&gt;{address},<br/>&gt; &gt; PeerPort =&gt; $self-&gt;{port},<br/>&gt; &gt; Proto =&gt; &quot;udp&quot;,<br/>&gt; &gt; ReuseAddr =&gt; 1,<br/>&gt; &gt; ) or croak $!;<br/>&gt; &gt;<br/>&gt; &gt; But it&#39;s this part that fails on the PI:<br/>&gt; &gt;<br/>&gt;<br/>&gt; A few things to check:<br/>&gt;<br/>&gt; 1. Which OS/distro/version and perl version on both machines?<br/>&gt;<br/>&gt; 2. Does it happen with the latest stable perl installed from source?<br/>&gt;<br/>&gt; 3. Did you try using https://en.wikipedia.org/wiki/GDB and/or perl -d:<br/>&gt; https://perl-begin.org/topics/debugging/ ?<br/>&gt;<br/>&gt; 4. Is there anything in the rpi&#39;s firewall config?<br/>&gt;<br/>&gt; For more advice, see<br/>&gt; https://github.com/shlomif/writing-the-perfect-question .<br/>&gt;<br/>&gt; &gt; $socket-&gt;mcast_send( $query, &quot;$self-&gt;{address}:$self-&gt;{port}&quot; ) or croak<br/>&gt; $!;<br/>&gt; &gt;<br/>&gt; &gt; I&#39;ve checked that $socket, $query and $self-&gt;{address}:$self-&gt;{port}<br/>&gt; &gt; contain the info I expect and they do.<br/>&gt; &gt;<br/>&gt; &gt; On my Linux laptop I can use tcpdump and see the communication between<br/>&gt; &gt; laptop and bulb. Doing this on the Pi shows no communication. I&#39;ve<br/>&gt; replaced<br/>&gt; &gt; the &quot;croak&quot; with &quot;die &quot;zzzzzzzzzzzz&quot; so I can be certain it&#39;s failing at<br/>&gt; &gt; that point. I get the output &quot;zzzzzzzzzzzz&quot; (makes it easier to spot).<br/>&gt; &gt;<br/>&gt; &gt; I&#39;ve just used a command recently that allows me to access the specific<br/>&gt; ip<br/>&gt; &gt; and port of the lamp and it indicates the connection is successful. I&#39;m<br/>&gt; out<br/>&gt; &gt; of ideas and if anyone can advise I&#39;d appreciate it.<br/>&gt; &gt;<br/>&gt; &gt; Slightly (very) out of my depth when it comes to ports and IPs etc.<br/>&gt; &gt;<br/>&gt; &gt; Thanks,<br/>&gt; &gt; James<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; --<br/>&gt;<br/>&gt; Shlomi Fish https://www.shlomifish.org/<br/>&gt; https://github.com/shlomif/validate-your-html - Validate Your HTML<br/>&gt;<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127317.html Sun, 05 Apr 2020 16:22:32 +0000 Re: IO::Socket::Multicast::mcast_send by Shlomi Fish Hi James,<br/><br/>On Sun, 5 Apr 2020 14:58:26 +0100<br/>James Kerwin &lt;jkerwin2101@gmail.com&gt; wrote:<br/><br/>&gt; Hi All,<br/>&gt; <br/>&gt; I&#39;m trying to connect to a smart bulb on my home WIFI using mcast_send<br/>&gt; in IO::Socket::Multicast.<br/>&gt; <br/>&gt; It works on my main Linux Mint laptop. The same script does not work on my<br/>&gt; Raspberry PI.<br/>&gt; <br/>&gt; Despite the script running as expected on one laptop I&#39;ve checked that this<br/>&gt; is all set up correctly:<br/>&gt; <br/>&gt; sub new {<br/>&gt; #my $class = shift;<br/>&gt; my $data = {<br/>&gt; address =&gt; &#39;239.255.255.250&#39;,<br/>&gt; port =&gt; 1982,<br/>&gt; timeout =&gt; 3,<br/>&gt; devices =&gt; [],<br/>&gt; };<br/>&gt; return bless( $data );<br/>&gt; }<br/>&gt; <br/><br/>It is a good idea to use bless with an explicit package name or just use<br/>https://metacpan.org/pod/Moo or Moose or similar.<br/><br/>&gt; my $socket = IO::Socket::Multicast-&gt;new(<br/>&gt; PeerAddr =&gt; $self-&gt;{address},<br/>&gt; PeerPort =&gt; $self-&gt;{port},<br/>&gt; Proto =&gt; &quot;udp&quot;,<br/>&gt; ReuseAddr =&gt; 1,<br/>&gt; ) or croak $!;<br/>&gt; <br/>&gt; But it&#39;s this part that fails on the PI:<br/>&gt; <br/><br/>A few things to check:<br/><br/>1. Which OS/distro/version and perl version on both machines?<br/><br/>2. Does it happen with the latest stable perl installed from source?<br/><br/>3. Did you try using https://en.wikipedia.org/wiki/GDB and/or perl -d:<br/>https://perl-begin.org/topics/debugging/ ?<br/><br/>4. Is there anything in the rpi&#39;s firewall config?<br/><br/>For more advice, see https://github.com/shlomif/writing-the-perfect-question .<br/><br/>&gt; $socket-&gt;mcast_send( $query, &quot;$self-&gt;{address}:$self-&gt;{port}&quot; ) or croak $!;<br/>&gt; <br/>&gt; I&#39;ve checked that $socket, $query and $self-&gt;{address}:$self-&gt;{port}<br/>&gt; contain the info I expect and they do.<br/>&gt; <br/>&gt; On my Linux laptop I can use tcpdump and see the communication between<br/>&gt; laptop and bulb. Doing this on the Pi shows no communication. I&#39;ve replaced<br/>&gt; the &quot;croak&quot; with &quot;die &quot;zzzzzzzzzzzz&quot; so I can be certain it&#39;s failing at<br/>&gt; that point. I get the output &quot;zzzzzzzzzzzz&quot; (makes it easier to spot).<br/>&gt; <br/>&gt; I&#39;ve just used a command recently that allows me to access the specific ip<br/>&gt; and port of the lamp and it indicates the connection is successful. I&#39;m out<br/>&gt; of ideas and if anyone can advise I&#39;d appreciate it.<br/>&gt; <br/>&gt; Slightly (very) out of my depth when it comes to ports and IPs etc.<br/>&gt; <br/>&gt; Thanks,<br/>&gt; James<br/><br/><br/><br/>-- <br/><br/>Shlomi Fish https://www.shlomifish.org/<br/>https://github.com/shlomif/validate-your-html - Validate Your HTML<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127316.html Sun, 05 Apr 2020 15:27:38 +0000 IO::Socket::Multicast::mcast_send by James Kerwin Hi All,<br/><br/>I&#39;m trying to connect to a smart bulb on my home WIFI using mcast_send<br/>in IO::Socket::Multicast.<br/><br/>It works on my main Linux Mint laptop. The same script does not work on my<br/>Raspberry PI.<br/><br/>Despite the script running as expected on one laptop I&#39;ve checked that this<br/>is all set up correctly:<br/><br/>sub new {<br/> #my $class = shift;<br/> my $data = {<br/> address =&gt; &#39;239.255.255.250&#39;,<br/> port =&gt; 1982,<br/> timeout =&gt; 3,<br/> devices =&gt; [],<br/> };<br/> return bless( $data );<br/>}<br/><br/>my $socket = IO::Socket::Multicast-&gt;new(<br/> PeerAddr =&gt; $self-&gt;{address},<br/> PeerPort =&gt; $self-&gt;{port},<br/> Proto =&gt; &quot;udp&quot;,<br/> ReuseAddr =&gt; 1,<br/> ) or croak $!;<br/><br/>But it&#39;s this part that fails on the PI:<br/><br/>$socket-&gt;mcast_send( $query, &quot;$self-&gt;{address}:$self-&gt;{port}&quot; ) or croak $!;<br/><br/>I&#39;ve checked that $socket, $query and $self-&gt;{address}:$self-&gt;{port}<br/>contain the info I expect and they do.<br/><br/>On my Linux laptop I can use tcpdump and see the communication between<br/>laptop and bulb. Doing this on the Pi shows no communication. I&#39;ve replaced<br/>the &quot;croak&quot; with &quot;die &quot;zzzzzzzzzzzz&quot; so I can be certain it&#39;s failing at<br/>that point. I get the output &quot;zzzzzzzzzzzz&quot; (makes it easier to spot).<br/><br/>I&#39;ve just used a command recently that allows me to access the specific ip<br/>and port of the lamp and it indicates the connection is successful. I&#39;m out<br/>of ideas and if anyone can advise I&#39;d appreciate it.<br/><br/>Slightly (very) out of my depth when it comes to ports and IPs etc.<br/><br/>Thanks,<br/>James<br/> https://www.nntp.perl.org/group/perl.beginners/2020/04/msg127315.html Sun, 05 Apr 2020 13:58:42 +0000 Re: Config::General save_file() not converting named block to nestedblock when there is only one block by Frans Spiesschaert Hi Andi,<br/><br/>I had a closer look at General.pm.<br/>It turns out that when a configuration file has only one block,<br/>Perl module Config::General puts it out as a named block on purpose.<br/>See lines 1445 - 1457 of General.pm on this.<br/>This behaviour has been introduced on Wed 18 Jul 2012 in version 2.51<br/>of Config::General to fix Perl Bug #77667 as General.pm says at line 1447<br/>(See https://rt.cpan.org/Public/Bug/Display.html?id=77667).<br/>I also tried to reproduce Bug #77667 against version 2.63 of General.pm<br/>and according to my findings, unfortunately this bug actually doesn&#39;t seem<br/>te be fixed.<br/><br/>Thank you for helping me out with this problem.<br/>Cheers,<br/>Frans Spiesschaert<br/><br/><br/>Andy Bach schreef op wo 26-02-2020 om 17:38 [-0600]:<br/>&gt; Yeah, no luck. I tried using an %options for the new() and set those<br/>&gt; various options to true[1], but made no difference. The interesting thing<br/>&gt; is it reads back just the single entry to the same hash, so maybe that&#39;s<br/>&gt; what &quot;You need also to know that named blocks will be converted to nested<br/>&gt; blocks (which is the same from the perl point of view)&quot; means.<br/>&gt; <br/>&gt; a<br/>&gt; <br/>&gt; [1]<br/>&gt; use strict;<br/>&gt; use warnings;<br/>&gt; use Config::General;<br/>&gt; use Data::Dumper;<br/>&gt; <br/>&gt; my $datafilename = &#39;example.conf&#39;;<br/>&gt; my %confighash;<br/>&gt; #my $config = \%confighash;<br/>&gt; my $cconfig-&gt;{client}-&gt;{Bob}-&gt;{city} = &#39;Brussels&#39;;<br/>&gt; $cconfig-&gt;{client}-&gt;{Jane}-&gt;{city} = &#39;Antwerp&#39;;<br/>&gt; <br/>&gt; my %options = (<br/>&gt; -ConfigHash =&gt; $cconfig,<br/>&gt; -ForceArray =&gt; 0,<br/>&gt; -AutoTrue =&gt; &#39;yes&#39;,<br/>&gt; -NormalizeBlock =&gt; 0,<br/>&gt; -AllowMultiOptions =&gt; 0,<br/>&gt; -MergeDuplicateBlocks =&gt; 1,<br/>&gt; );<br/>&gt; my $datafile = Config::General-&gt;new( %options );<br/>&gt; print &quot;d: &quot;, Dumper(\$datafile), &quot;\n&quot;;<br/>&gt; $datafile-&gt;save_file($datafilename);<br/>&gt; <br/>&gt; #print &quot;c: &quot;, Dumper(\$config), &quot;\n&quot;;<br/>&gt; my $new_conf = Config::General-&gt;new($datafilename);<br/>&gt; print &quot;r: &quot;, Dumper(\$new_conf), &quot;\n&quot;;<br/>&gt; <br/>&gt; On Wed, Feb 26, 2020 at 2:28 PM Frans Spiesschaert &lt;<br/>&gt; Frans.Spiesschaert@yucom.be&gt; wrote:<br/>&gt; &gt; Hi,<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; This is my exmple.pl<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; #!/usr/bin/perl -w<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; use strict;<br/>&gt; &gt; <br/>&gt; &gt; use Config::General;<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; my $datafilename = &#39;example.conf&#39;;<br/>&gt; &gt; <br/>&gt; &gt; my %confighash;<br/>&gt; &gt; <br/>&gt; &gt; my $config = \%confighash;<br/>&gt; &gt; <br/>&gt; &gt; $config-&gt;{client}-&gt;{Bob}-&gt;{city} = &#39;Brussels&#39;;<br/>&gt; &gt; <br/>&gt; &gt; $config-&gt;{client}-&gt;{Jane}-&gt;{city} = &#39;Antwerp&#39;;<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; my $datafile = Config::General-&gt;new;<br/>&gt; &gt; <br/>&gt; &gt; $datafile-&gt;save_file($datafilename, $config);<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; and that gives as expected the following result:<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; &lt;client&gt;<br/>&gt; &gt; <br/>&gt; &gt; &lt;Jane&gt;<br/>&gt; &gt; <br/>&gt; &gt; city Antwerp<br/>&gt; &gt; <br/>&gt; &gt; &lt;/Jane&gt;<br/>&gt; &gt; <br/>&gt; &gt; &lt;Bob&gt;<br/>&gt; &gt; <br/>&gt; &gt; city Brussels<br/>&gt; &gt; <br/>&gt; &gt; &lt;/Bob&gt;<br/>&gt; &gt; <br/>&gt; &gt; &lt;/client&gt;<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; but when I comment out in that file the line:<br/>&gt; &gt; <br/>&gt; &gt; # $config-&gt;{client}-&gt;{Jane}-&gt;{city} = &#39;Antwerp&#39;;<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; I get the following result:<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; &lt;client Bob&gt;<br/>&gt; &gt; <br/>&gt; &gt; city Brussels<br/>&gt; &gt; <br/>&gt; &gt; &lt;/client&gt;<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; But also in such a case I want to get <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; &lt;client&gt; <br/>&gt; &gt; <br/>&gt; &gt; &lt;Bob&gt;<br/>&gt; &gt; <br/>&gt; &gt; city Brussels<br/>&gt; &gt; <br/>&gt; &gt; &lt;/Bob&gt;<br/>&gt; &gt; <br/>&gt; &gt; &lt;/client&gt;<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; Is there a way to get this result in such a case?<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; -- <br/>&gt; &gt; <br/>&gt; &gt; Kind regards,<br/>&gt; &gt; <br/>&gt; &gt; Frans Spiesschaert<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; -- <br/>&gt; &gt; <br/>&gt; &gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt; &gt; <br/>&gt; &gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt; &gt; <br/>&gt; &gt; http://learn.perl.org/<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/><br/><br/> https://www.nntp.perl.org/group/perl.beginners/2020/03/msg127314.html Mon, 23 Mar 2020 20:09:33 +0000 Problem with interaction of open3, sysread and DBI (pg) by Mike Martin via beginners I have a strange issue with sysread and postgres (and ffpeg/stderr)<br/><br/>If the main program throws an error sysread stops if I write to the<br/>database (a log table)<br/><br/>this is the program (need open3 because ffmpeg writes to stderr not stdout)<br/><br/>use IPC::Open3;<br/>my($file,$in, $out);<br/>my $pid;<br/>use Symbol &#39;gensym&#39;; $file = gensym;<br/>if ($soptsr-&gt;{command}=~/ffmpeg/){<br/> $pid=open3(undef, undef, $file,$soptsr-&gt;{command},<br/>@{$soptsr-&gt;{optsin}});# or die print &quot;$!&quot;;<br/>}<br/><br/>our $tag= Glib::IO-&gt;add_watch ( fileno($output), [&#39;in&#39;, &#39;hup&#39;], sub {<br/>#local $SIG{__WARN__} = sub {};<br/><br/><br/>my ($fileno, $condition,$tag) = @_;<br/><br/>if ($condition =~ /hup/) {<br/> close $file;<br/> Gtk3-&gt;main_quit();<br/> return 1;<br/>}<br/><br/>my $line ;<br/><br/>sysread $output, $line, 256 or die print $!;<br/>my @line=split /\n/,$line;<br/>foreach my $l (@line){<br/>print $DBI::err,&quot;\n&quot;;#,$ins-&gt;{errstr},&quot;\n&quot;;<br/>#print $condition,&quot;\n&quot;;<br/> #$ins-&gt;execute($soptsr-&gt;{transref},$soptsr-&gt;{fileid},$l);# if $l;<br/>}<br/>print &quot;\n&quot;,$condition,&quot;\t&quot;,$line,&quot;\n&quot;;### this stops if I write todb with<br/>prog error<br/><br/>return 1;<br/> }<br/> );<br/>}<br/><br/><br/><br/><br/>This is the output<br/><br/><br/>[ in ] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from<br/>&#39;/srv/data/Downloads/xxxxxxxxxxxxxxxxxx.mp4&#39;:<br/> Metadata:<br/> major_brand : isom<br/> minor_version : 512<br/> compatible_brands: isomiso2avc1mp41<br/> Duration: 01:06:48.30, start: 0.000000, bitrate: 237 kb<br/><br/>[ in ] /s<br/> Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 /<br/>0x31637661), yuv420p, 426x240, 201 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc<br/>(default)<br/> Metadata:<br/> handler_name : VideoHandler<br/> Stream #0:1(und): Audio: aac (LC) (mp4a / 0x613470<br/><br/>[ in ] 6D), 24000 Hz, mono, fltp, 32 kb/s (default)<br/> Metadata:<br/> handler_name : VideoHandler<br/><br/>### If I write to db output stops here ###<br/>### If I dont the output continues ###<br/><br/>[ in ] Stream mapping:<br/> Stream #0:0 -&gt; #0:0 (h264 (native) -&gt; h264 (libx264))<br/> Stream #0:1 -&gt; #0:1 (aac (native) -&gt; mp3 (libmp3lame))<br/>Press [q] to stop, [?] for help<br/><br/><br/>[ in ] [AVFilterGraph @ 0x55b6655bf800] No such filter: &#39;-setpts&#39;<br/><br/><br/>[ in ] Error reinitializing filters!<br/>Failed to inject frame into filter network: Invalid argument<br/>Error while processing the decoded data for stream #0:0<br/><br/><br/>[ in ] Conversion failed!<br/><br/>Any ideas?<br/><br/>(I have fixed the error in the program, but I need to be able to log if I<br/>have other errors)<br/> https://www.nntp.perl.org/group/perl.beginners/2020/03/msg127313.html Sun, 22 Mar 2020 13:31:56 +0000 Re: Config::General save_file() not converting named block to nestedblock when there is only one block] by Frans Spiesschaert <br/> <br/> https://www.nntp.perl.org/group/perl.beginners/2020/02/msg127312.html Wed, 26 Feb 2020 22:13:25 +0000 Re: Config::General save_file() not converting named block to nestedblock when there is only one block by Andy Bach Huh. Seems the docs would say the opposite<br/> save_file()<br/> Writes the config hash back to the hard disk. This method takes one<br/>or<br/> two parameters. The first parameter must be the filename where the<br/> config should be written to. The second parameter is optional, it<br/>must<br/> be a reference to a hash structure, if you set it. If you do not<br/> supply this second parameter then the internal config hash, which<br/>has<br/> already been parsed, will be used.<br/><br/> Please note that any occurrence of comments will be ignored by<br/> getall() and thus be lost after you call this method.<br/><br/> You need also to know that named blocks will be converted to nested<br/> blocks (which is the same from the perl point of view). An example:<br/><br/> &lt;user hans&gt;<br/> id 13<br/> &lt;/user&gt;<br/><br/> will become the following after saving:<br/><br/> &lt;user&gt;<br/> &lt;hans&gt;<br/> id 13<br/> &lt;/hans&gt;<br/> &lt;/user&gt;<br/><br/><br/><br/>On Wed, Feb 26, 2020 at 2:28 PM Frans Spiesschaert &lt;<br/>Frans.Spiesschaert@yucom.be&gt; wrote:<br/><br/>&gt; Hi,<br/>&gt;<br/>&gt; This is my exmple.pl<br/>&gt;<br/>&gt; #!/usr/bin/perl -w<br/>&gt;<br/>&gt; use strict;<br/>&gt; use Config::General;<br/>&gt;<br/>&gt; my $datafilename = &#39;example.conf&#39;;<br/>&gt; my %confighash;<br/>&gt; my $config = \%confighash;<br/>&gt; $config-&gt;{client}-&gt;{Bob}-&gt;{city} = &#39;Brussels&#39;;<br/>&gt; $config-&gt;{client}-&gt;{Jane}-&gt;{city} = &#39;Antwerp&#39;;<br/>&gt;<br/>&gt; my $datafile = Config::General-&gt;new;<br/>&gt; $datafile-&gt;save_file($datafilename, $config);<br/>&gt;<br/>&gt;<br/>&gt; and that gives as expected the following result:<br/>&gt;<br/>&gt; &lt;client&gt;<br/>&gt; &lt;Jane&gt;<br/>&gt; city Antwerp<br/>&gt; &lt;/Jane&gt;<br/>&gt; &lt;Bob&gt;<br/>&gt; city Brussels<br/>&gt; &lt;/Bob&gt;<br/>&gt; &lt;/client&gt;<br/>&gt;<br/>&gt;<br/>&gt; but when I comment out in that file the line:<br/>&gt; # $config-&gt;{client}-&gt;{Jane}-&gt;{city} = &#39;Antwerp&#39;;<br/>&gt;<br/>&gt; I get the following result:<br/>&gt;<br/>&gt; &lt;client Bob&gt;<br/>&gt; city Brussels<br/>&gt; &lt;/client&gt;<br/>&gt;<br/>&gt; But also in such a case I want to get<br/>&gt;<br/>&gt; &lt;client&gt;<br/>&gt; &lt;Bob&gt;<br/>&gt; city Brussels<br/>&gt; &lt;/Bob&gt;<br/>&gt; &lt;/client&gt;<br/>&gt;<br/>&gt; Is there a way to get this result in such a case?<br/>&gt;<br/>&gt;<br/>&gt; --<br/>&gt; Kind regards,<br/>&gt; Frans Spiesschaert<br/>&gt;<br/>&gt; --<br/>&gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt; http://learn.perl.org/<br/>&gt;<br/>&gt;<br/>&gt;<br/><br/>-- <br/><br/>a<br/><br/>Andy Bach,<br/>afbach@gmail.com<br/>608 658-1890 cell<br/>608 261-5738 wk<br/> https://www.nntp.perl.org/group/perl.beginners/2020/02/msg127311.html Wed, 26 Feb 2020 21:30:27 +0000 Config::General save_file() not converting named block to nestedblock when there is only one block by Frans Spiesschaert Hi,<br/><br/>This is my exmple.pl<br/><br/>#!/usr/bin/perl -w<br/><br/>use strict;<br/>use Config::General;<br/><br/>my $datafilename = &#39;example.conf&#39;;<br/>my %confighash;<br/>my $config = \%confighash;<br/>$config-&gt;{client}-&gt;{Bob}-&gt;{city} = &#39;Brussels&#39;;<br/>$config-&gt;{client}-&gt;{Jane}-&gt;{city} = &#39;Antwerp&#39;;<br/><br/>my $datafile = Config::General-&gt;new;<br/>$datafile-&gt;save_file($datafilename, $config);<br/><br/><br/>and that gives as expected the following result:<br/><br/>&lt;client&gt;<br/> &lt;Jane&gt;<br/> city Antwerp<br/> &lt;/Jane&gt;<br/> &lt;Bob&gt;<br/> city Brussels<br/> &lt;/Bob&gt;<br/>&lt;/client&gt;<br/><br/><br/>but when I comment out in that file the line:<br/># $config-&gt;{client}-&gt;{Jane}-&gt;{city} = &#39;Antwerp&#39;;<br/><br/>I get the following result:<br/><br/>&lt;client Bob&gt;<br/> city Brussels<br/>&lt;/client&gt;<br/><br/>But also in such a case I want to get <br/><br/>&lt;client&gt; <br/> &lt;Bob&gt;<br/> city Brussels<br/> &lt;/Bob&gt;<br/>&lt;/client&gt;<br/><br/>Is there a way to get this result in such a case?<br/><br/><br/>-- <br/>Kind regards,<br/>Frans Spiesschaert<br/> https://www.nntp.perl.org/group/perl.beginners/2020/02/msg127310.html Wed, 26 Feb 2020 20:28:10 +0000 Re: Unsatisfied dependencies detected duringOALDERS/HTTP-Date-6.05.tar.gz by Shlomi Fish Hi Jeffrey, <br/> <br/>On Tue, 28 Jan 2020 18:34:50 -0500 <br/>Jeffrey Walton &lt;noloader@gmail.com&gt; wrote: <br/> <br/>&gt; Hi Everyone, <br/>&gt; <br/>&gt; I&#39;m trying to build Perl 5.30.1 from sources. I&#39;m using: <br/>&gt; <br/>&gt; ./Configure -des -Dextras=&quot;HTTP::Daemon HTTP::Request Test::More <br/>&gt; Text::Template&quot; <br/>&gt; <br/>&gt; I&#39;m seeing this in an endless loop (ad infinitum) on Fedora 1, Ubuntu <br/>&gt; 4, CentOS 5 and Fedora 31. <br/>&gt; <br/> <br/>I can reproduce this on fedora 31 x86-64 too. <br/> <br/>&gt; Running make for O/OA/OALDERS/HTTP-Date-6.05.tar.gz <br/>&gt; ---- Unsatisfied dependencies detected during ---- <br/>&gt; ---- OALDERS/HTTP-Date-6.05.tar.gz ---- <br/>&gt; Time::Zone [requires] <br/>&gt; Running make for module &#39;Time::Zone&#39; <br/>&gt; ATOOMIC/TimeDate-2.31.tar.gz <br/>&gt; Has already been unwrapped into directory /root/.cpan/build/TimeDate-2.31-0 <br/>&gt; ATOOMIC/TimeDate-2.31.tar.gz <br/>&gt; Has already been prepared <br/>&gt; ATOOMIC/TimeDate-2.31.tar.gz <br/>&gt; Has already been made <br/>&gt; OALDERS/HTTP-Date-6.05.tar.gz <br/>&gt; Has already been unwrapped into directory /root/.cpan/build/HTTP-Date-6.05-0 <br/>&gt; OALDERS/HTTP-Date-6.05.tar.gz <br/>&gt; Has already been prepared <br/>&gt; Running make for O/OA/OALDERS/HTTP-Date-6.05.tar.gz <br/>&gt; ---- Unsatisfied dependencies detected during ---- <br/>&gt; ---- OALDERS/HTTP-Date-6.05.tar.gz ---- <br/>&gt; Time::Zone [requires] <br/>&gt; Running make for module &#39;Time::Zone&#39; <br/>&gt; ATOOMIC/TimeDate-2.31.tar.gz <br/>&gt; Has already been unwrapped into directory /root/.cpan/build/TimeDate-2.31-0 <br/>&gt; ATOOMIC/TimeDate-2.31.tar.gz <br/>&gt; Has already been prepared <br/>&gt; ATOOMIC/TimeDate-2.31.tar.gz <br/>&gt; Has already been made <br/>&gt; OALDERS/HTTP-Date-6.05.tar.gz <br/>&gt; Has already been unwrapped into directory /root/.cpan/build/HTTP-Date-6.05-0 <br/>&gt; OALDERS/HTTP-Date-6.05.tar.gz <br/>&gt; Has already been prepared <br/>&gt; ... <br/>&gt; <br/>&gt; I believe this break is partially due to building artifacts during <br/>&gt; &#39;make install&#39;. The GNU Coding Standards explicitly states _DO NOT DO <br/>&gt; IT_. The only time things get built is during &#39;make&#39;. <br/>&gt; <br/>&gt; Does anyone know how to work around this (or any of the other build <br/>&gt; problems I am having)? <br/>&gt; <br/>&gt; Do the Perl devs actually test this stuff? <br/>&gt; <br/> <br/>Perhaps we should report a bug. <br/> <br/>&gt; Jeff <br/>&gt; <br/> <br/> <br/> <br/>-- <br/> <br/>Shlomi Fish https://www.shlomifish.org/ <br/>http://is.gd/htwEXQ - Integrating GNU Guile into GNU coreutils <br/> <br/>&quot;Not totally broken&quot; might be a suitable marketing strategy for Microsoft, <br/>but I&#39;m not convinced it&#39;s a level we want to be particularly aiming for. <br/> &mdash; Matthew Palmer ( https://is.gd/Eil4Io ) <br/> <br/>Please reply to list if it&#39;s a mailing list post - http://shlom.in/reply . <br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127309.html Wed, 29 Jan 2020 09:34:26 +0000 Unsatisfied dependencies detected duringOALDERS/HTTP-Date-6.05.tar.gz by Jeffrey Walton Hi Everyone,<br/><br/>I&#39;m trying to build Perl 5.30.1 from sources. I&#39;m using:<br/><br/> ./Configure -des -Dextras=&quot;HTTP::Daemon HTTP::Request Test::More<br/>Text::Template&quot;<br/><br/>I&#39;m seeing this in an endless loop (ad infinitum) on Fedora 1, Ubuntu<br/>4, CentOS 5 and Fedora 31.<br/><br/>Running make for O/OA/OALDERS/HTTP-Date-6.05.tar.gz<br/>---- Unsatisfied dependencies detected during ----<br/>---- OALDERS/HTTP-Date-6.05.tar.gz ----<br/> Time::Zone [requires]<br/>Running make for module &#39;Time::Zone&#39;<br/> ATOOMIC/TimeDate-2.31.tar.gz<br/> Has already been unwrapped into directory /root/.cpan/build/TimeDate-2.31-0<br/> ATOOMIC/TimeDate-2.31.tar.gz<br/> Has already been prepared<br/> ATOOMIC/TimeDate-2.31.tar.gz<br/> Has already been made<br/> OALDERS/HTTP-Date-6.05.tar.gz<br/> Has already been unwrapped into directory /root/.cpan/build/HTTP-Date-6.05-0<br/> OALDERS/HTTP-Date-6.05.tar.gz<br/> Has already been prepared<br/>Running make for O/OA/OALDERS/HTTP-Date-6.05.tar.gz<br/>---- Unsatisfied dependencies detected during ----<br/>---- OALDERS/HTTP-Date-6.05.tar.gz ----<br/> Time::Zone [requires]<br/>Running make for module &#39;Time::Zone&#39;<br/> ATOOMIC/TimeDate-2.31.tar.gz<br/> Has already been unwrapped into directory /root/.cpan/build/TimeDate-2.31-0<br/> ATOOMIC/TimeDate-2.31.tar.gz<br/> Has already been prepared<br/> ATOOMIC/TimeDate-2.31.tar.gz<br/> Has already been made<br/> OALDERS/HTTP-Date-6.05.tar.gz<br/> Has already been unwrapped into directory /root/.cpan/build/HTTP-Date-6.05-0<br/> OALDERS/HTTP-Date-6.05.tar.gz<br/> Has already been prepared<br/>...<br/><br/>I believe this break is partially due to building artifacts during<br/>&#39;make install&#39;. The GNU Coding Standards explicitly states _DO NOT DO<br/>IT_. The only time things get built is during &#39;make&#39;.<br/><br/>Does anyone know how to work around this (or any of the other build<br/>problems I am having)?<br/><br/>Do the Perl devs actually test this stuff?<br/><br/>Jeff<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127308.html Tue, 28 Jan 2020 23:35:10 +0000 Re: lib/auto/IO/Compress/Compress.a: No such file or directory by Jeffrey Walton On Tue, Jan 28, 2020 at 1:02 PM Jeffrey Walton &lt;noloader@gmail.com&gt; wrote:<br/>&gt;<br/>&gt; On Tue, Jan 28, 2020 at 4:06 AM Jeffrey Walton &lt;noloader@gmail.com&gt; wrote:<br/>&gt; &gt;<br/>&gt; &gt; Hi Everyone,<br/>&gt; &gt;<br/>&gt; &gt; I&#39;m catching this error when building Perl from sources. Both Perl<br/>&gt; &gt; 5.10.1 and Perl 5.30.1 experience it. I am seeing it on both Fedora 1<br/>&gt; &gt; and Cent OS 5.<br/>&gt; &gt;<br/>&gt; &gt; cc -o perl -L/home/jwalton/bootstrap/lib perlmain.o<br/>&gt; &gt; lib/auto/attrs/attrs.a lib/auto/B/B.a<br/>&gt; &gt; lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a<br/>&gt; &gt; lib/auto/Cwd/Cwd.a lib/auto/Data/Dumper/Dumper.a<br/>&gt; &gt; lib/auto/Devel/DProf/DProf.a lib/auto/Devel/Peek/Peek.a<br/>&gt; &gt; lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a<br/>&gt; &gt; lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a<br/>&gt; &gt; lib/auto/Fcntl/Fcntl.a lib/auto/File/Glob/Glob.a<br/>&gt; &gt; lib/auto/Filter/Util/Call/Call.a lib/auto/Hash/Util/Util.a<br/>&gt; &gt; lib/auto/Hash/Util/FieldHash/FieldHash.a<br/>&gt; &gt; lib/auto/I18N/Langinfo/Langinfo.a lib/auto/IO/IO.a<br/>&gt; &gt; lib/auto/IO/Compress/Compress.a lib/auto/IPC/SysV/SysV.a<br/>&gt; &gt; lib/auto/List/Util/Util.a lib/auto/Math/BigInt/FastCalc/FastCalc.a<br/>&gt; &gt; lib/auto/MIME/Base64/Base64.a lib/auto/mro/mro.a<br/>&gt; &gt; lib/auto/Opcode/Opcode.a lib/auto/PerlIO/encoding/encoding.a<br/>&gt; &gt; lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a<br/>&gt; &gt; lib/auto/POSIX/POSIX.a lib/auto/re/re.a lib/auto/SDBM_File/SDBM_File.a<br/>&gt; &gt; lib/auto/Socket/Socket.a lib/auto/Storable/Storable.a<br/>&gt; &gt; lib/auto/Sys/Hostname/Hostname.a lib/auto/Sys/Syslog/Syslog.a<br/>&gt; &gt; lib/auto/Text/Soundex/Soundex.a lib/auto/threads/threads.a<br/>&gt; &gt; lib/auto/threads/shared/shared.a lib/auto/Time/HiRes/HiRes.a<br/>&gt; &gt; lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Normalize/Normalize.a<br/>&gt; &gt; lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a<br/>&gt; &gt; lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a<br/>&gt; &gt; lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a<br/>&gt; &gt; lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a libperl.a<br/>&gt; &gt; `cat ext.libs` /home/jwalton/bootstrap/lib/libdb.a -lm<br/>&gt; &gt; /usr/lib/libcrypt.a<br/>&gt; &gt; cc: lib/auto/IO/Compress/Compress.a: No such file or directory<br/>&gt; &gt;<br/>&gt; &gt; Here is the full build: https://pastebin.com/Pu0cYi25<br/>&gt;<br/>&gt; How does the build system find lib/auto/IO/Compress/Compress.a at<br/>&gt; lines 2071, 4257, 5416; but fails to find it at 6124?<br/>&gt;<br/>&gt; Is Perl deleting an archive it needs? If so, then how do I stop it<br/>&gt; from deleting files it needs?.<br/><br/> ./Configure -des -Dcompression=disable<br/><br/>suffers the same problem.<br/><br/>I&#39;m pretty sure this build system is broken.<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127307.html Tue, 28 Jan 2020 18:51:19 +0000 Re: lib/auto/IO/Compress/Compress.a: No such file or directory by Jeffrey Walton On Tue, Jan 28, 2020 at 4:06 AM Jeffrey Walton &lt;noloader@gmail.com&gt; wrote:<br/>&gt;<br/>&gt; Hi Everyone,<br/>&gt;<br/>&gt; I&#39;m catching this error when building Perl from sources. Both Perl<br/>&gt; 5.10.1 and Perl 5.30.1 experience it. I am seeing it on both Fedora 1<br/>&gt; and Cent OS 5.<br/>&gt;<br/>&gt; cc -o perl -L/home/jwalton/bootstrap/lib perlmain.o<br/>&gt; lib/auto/attrs/attrs.a lib/auto/B/B.a<br/>&gt; lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a<br/>&gt; lib/auto/Cwd/Cwd.a lib/auto/Data/Dumper/Dumper.a<br/>&gt; lib/auto/Devel/DProf/DProf.a lib/auto/Devel/Peek/Peek.a<br/>&gt; lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a<br/>&gt; lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a<br/>&gt; lib/auto/Fcntl/Fcntl.a lib/auto/File/Glob/Glob.a<br/>&gt; lib/auto/Filter/Util/Call/Call.a lib/auto/Hash/Util/Util.a<br/>&gt; lib/auto/Hash/Util/FieldHash/FieldHash.a<br/>&gt; lib/auto/I18N/Langinfo/Langinfo.a lib/auto/IO/IO.a<br/>&gt; lib/auto/IO/Compress/Compress.a lib/auto/IPC/SysV/SysV.a<br/>&gt; lib/auto/List/Util/Util.a lib/auto/Math/BigInt/FastCalc/FastCalc.a<br/>&gt; lib/auto/MIME/Base64/Base64.a lib/auto/mro/mro.a<br/>&gt; lib/auto/Opcode/Opcode.a lib/auto/PerlIO/encoding/encoding.a<br/>&gt; lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a<br/>&gt; lib/auto/POSIX/POSIX.a lib/auto/re/re.a lib/auto/SDBM_File/SDBM_File.a<br/>&gt; lib/auto/Socket/Socket.a lib/auto/Storable/Storable.a<br/>&gt; lib/auto/Sys/Hostname/Hostname.a lib/auto/Sys/Syslog/Syslog.a<br/>&gt; lib/auto/Text/Soundex/Soundex.a lib/auto/threads/threads.a<br/>&gt; lib/auto/threads/shared/shared.a lib/auto/Time/HiRes/HiRes.a<br/>&gt; lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Normalize/Normalize.a<br/>&gt; lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a<br/>&gt; lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a<br/>&gt; lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a<br/>&gt; lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a libperl.a<br/>&gt; `cat ext.libs` /home/jwalton/bootstrap/lib/libdb.a -lm<br/>&gt; /usr/lib/libcrypt.a<br/>&gt; cc: lib/auto/IO/Compress/Compress.a: No such file or directory<br/>&gt;<br/>&gt; Here is the full build: https://pastebin.com/Pu0cYi25<br/><br/>How does the build system find lib/auto/IO/Compress/Compress.a at<br/>lines 2071, 4257, 5416; but fails to find it at 6124?<br/><br/>Is Perl deleting an archive it needs? If so, then how do I stop it<br/>from deleting files it needs?<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127306.html Tue, 28 Jan 2020 18:03:34 +0000 lib/auto/IO/Compress/Compress.a: No such file or directory by Jeffrey Walton Hi Everyone,<br/><br/>I&#39;m catching this error when building Perl from sources. Both Perl<br/>5.10.1 and Perl 5.30.1 experience it. I am seeing it on both Fedora 1<br/>and Cent OS 5.<br/><br/>cc -o perl -L/home/jwalton/bootstrap/lib perlmain.o<br/>lib/auto/attrs/attrs.a lib/auto/B/B.a<br/>lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a<br/>lib/auto/Cwd/Cwd.a lib/auto/Data/Dumper/Dumper.a<br/>lib/auto/Devel/DProf/DProf.a lib/auto/Devel/Peek/Peek.a<br/>lib/auto/Devel/PPPort/PPPort.a lib/auto/Digest/MD5/MD5.a<br/>lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a<br/>lib/auto/Fcntl/Fcntl.a lib/auto/File/Glob/Glob.a<br/>lib/auto/Filter/Util/Call/Call.a lib/auto/Hash/Util/Util.a<br/>lib/auto/Hash/Util/FieldHash/FieldHash.a<br/>lib/auto/I18N/Langinfo/Langinfo.a lib/auto/IO/IO.a<br/>lib/auto/IO/Compress/Compress.a lib/auto/IPC/SysV/SysV.a<br/>lib/auto/List/Util/Util.a lib/auto/Math/BigInt/FastCalc/FastCalc.a<br/>lib/auto/MIME/Base64/Base64.a lib/auto/mro/mro.a<br/>lib/auto/Opcode/Opcode.a lib/auto/PerlIO/encoding/encoding.a<br/>lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a<br/>lib/auto/POSIX/POSIX.a lib/auto/re/re.a lib/auto/SDBM_File/SDBM_File.a<br/>lib/auto/Socket/Socket.a lib/auto/Storable/Storable.a<br/>lib/auto/Sys/Hostname/Hostname.a lib/auto/Sys/Syslog/Syslog.a<br/>lib/auto/Text/Soundex/Soundex.a lib/auto/threads/threads.a<br/>lib/auto/threads/shared/shared.a lib/auto/Time/HiRes/HiRes.a<br/>lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Normalize/Normalize.a<br/>lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a<br/>lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a<br/>lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a<br/>lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a libperl.a<br/>`cat ext.libs` /home/jwalton/bootstrap/lib/libdb.a -lm<br/>/usr/lib/libcrypt.a<br/>cc: lib/auto/IO/Compress/Compress.a: No such file or directory<br/><br/>Here is the full build: https://pastebin.com/Pu0cYi25<br/><br/>Here is the Configure line. PREFIX is $HOME/bootstrap.<br/><br/>if ! ./Configure -des -Dprefix=&quot;$PREFIX&quot; -Dextras=&quot;Test::More Text::Template&quot; \<br/> -Dlocincpth=&quot;$PREFIX/include&quot; -Dloclibpth=&quot;$PREFIX/lib&quot;<br/>-Dlibs=&quot;$PREFIX/lib/libdb.a -lm&quot;<br/>then<br/> echo &quot;Failed to configure Perl&quot;<br/> exit 1<br/>fi<br/>...<br/><br/>I saw something online about Perl&#39;s IO compression being optional, but<br/>I could not find the switch to disable it.<br/><br/>Does anyone know how to work around this?<br/><br/>Thanks in advance.<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127305.html Tue, 28 Jan 2020 09:06:18 +0000 Re: How to remove BerkleyDB dependency when building Perl fromsources by Shlomi Fish Hi Jeffrey, <br/> <br/>On Tue, 28 Jan 2020 01:02:46 -0500 <br/>Jeffrey Walton &lt;noloader@gmail.com&gt; wrote: <br/> <br/>&gt; Hi Everyone, <br/>&gt; <br/>&gt; I regression test on old machines. The older machines need an updated <br/>&gt; Git, SSH and Wget. To update Git, SSH and Wget I need to build a lot <br/>&gt; of dependent software. Perl is one of them. <br/>&gt; <br/>&gt; On Fedora 1 while trying to build Perl 5.10.1: <br/>&gt; <br/> <br/>perl 5.10.1 is very old and no longer maintained (see what I wrote at <br/>https://github.com/shlomif/supporting-older-perl5-releases ), but OTOH so is <br/>Fedora 1. <br/> <br/>&gt; &lt;snip&gt; <br/>&gt; I&#39;ve tried to compile and run the following simple program: <br/>&gt; <br/>&gt; #include &lt;stdio.h&gt; <br/>&gt; int main() { printf(&quot;Ok\n&quot;); return(0); } <br/>&gt; <br/>&gt; I used the command: <br/>&gt; <br/>&gt; cc -o try -O2 -fno-strict-aliasing -pipe -I/usr/local/include <br/>&gt; -L/usr/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc <br/>&gt; ./try <br/>&gt; <br/>&gt; and I got the following output: <br/>&gt; <br/>&gt; ./try: error while loading shared libraries: libdb-6.2.so: cannot open <br/>&gt; shared object file: No such file or directory <br/>&gt; The program compiled OK, but exited with status 127. <br/>&gt; You have a problem. Shall I abort Configure [y] <br/>&gt; Ok. Stopping Configure. <br/>&gt; &lt;/snip&gt; <br/>&gt; <br/>&gt; I don&#39;t need database functions at this point so I would like to <br/>&gt; disable Berkley DB. &#39;Configure --help&#39; does not list an option to <br/>&gt; disable the database gear. <br/>&gt; <br/>&gt; I can&#39;t downgrade Perl because OpenSSL 1.1.x needs Perl 5.10. (OpenSSL <br/>&gt; really screwed us when the EOL&#39;d 1.0.2 last month). <br/>&gt; <br/>&gt; How do I remove or disable the BerkleyDB dependency? <br/>&gt; <br/> <br/>You can try editing the &quot;Configure&quot; script by hand. It is written in <br/>https://en.wikipedia.org/wiki/Bourne_shell . <br/> <br/>I recall trying to use Red Hat Linux 6.2 in a vbox VM and giving up after <br/>the new openssl failed to compile using the old gcc there. <br/> <br/>Good luck! <br/> <br/>&gt; Thanks in advance. <br/>&gt; <br/> <br/> <br/> <br/>-- <br/> <br/>Shlomi Fish https://www.shlomifish.org/ <br/>Interview with Ben Collins-Sussman - https://shlom.in/sussman <br/> <br/>Chuck Norris refactors 10 million lines of Perl code before lunch. <br/> &mdash; http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ <br/> <br/>Please reply to list if it&#39;s a mailing list post - http://shlom.in/reply . <br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127304.html Tue, 28 Jan 2020 08:49:55 +0000 Re: How to remove BerkleyDB dependency when building Perl fromsources by Jeffrey Walton On Tue, Jan 28, 2020 at 3:02 AM Shlomi Fish &lt;shlomif@shlomifish.org&gt; wrote:<br/>&gt;<br/>&gt; ...<br/>&gt; &gt;<br/>&gt; &gt; On Fedora 1 while trying to build Perl 5.10.1:<br/>&gt; &gt;<br/>&gt;<br/>&gt; perl 5.10.1 is very old and no longer maintained (see what I wrote at<br/>&gt; https://github.com/shlomif/supporting-older-perl5-releases ), but OTOH so is<br/>&gt; Fedora 1.<br/><br/>Yeah, this is the worst part. I am bootstrapping a private Wget that<br/>has HTTPS support (and not much more) so I can fetch the latest<br/>packages. Once I get beyond bootstrap I can build the latest of<br/>everything.<br/><br/>There&#39;s a nasty little circular dependency in OpenSSL 1.1.x since<br/>OpenSSL needs Perl 5.10 to configure itself:<br/><br/> * OpenSSL needs Perl 5.10<br/> * Perl needs BerkelyDB 6.2<br/> * BerkelyDB needs OpenSSL<br/><br/>Once I get OpenSSL built, then Wget is a breeze.<br/><br/>Jeff<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127303.html Tue, 28 Jan 2020 08:42:28 +0000 How to remove BerkleyDB dependency when building Perl from sources by Jeffrey Walton Hi Everyone,<br/><br/>I regression test on old machines. The older machines need an updated<br/>Git, SSH and Wget. To update Git, SSH and Wget I need to build a lot<br/>of dependent software. Perl is one of them.<br/><br/>On Fedora 1 while trying to build Perl 5.10.1:<br/><br/>&lt;snip&gt;<br/>I&#39;ve tried to compile and run the following simple program:<br/><br/>#include &lt;stdio.h&gt;<br/>int main() { printf(&quot;Ok\n&quot;); return(0); }<br/><br/>I used the command:<br/><br/> cc -o try -O2 -fno-strict-aliasing -pipe -I/usr/local/include<br/>-L/usr/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc<br/> ./try<br/><br/>and I got the following output:<br/><br/>./try: error while loading shared libraries: libdb-6.2.so: cannot open<br/>shared object file: No such file or directory<br/>The program compiled OK, but exited with status 127.<br/>You have a problem. Shall I abort Configure [y]<br/>Ok. Stopping Configure.<br/>&lt;/snip&gt;<br/><br/>I don&#39;t need database functions at this point so I would like to<br/>disable Berkley DB. &#39;Configure --help&#39; does not list an option to<br/>disable the database gear.<br/><br/>I can&#39;t downgrade Perl because OpenSSL 1.1.x needs Perl 5.10. (OpenSSL<br/>really screwed us when the EOL&#39;d 1.0.2 last month).<br/><br/>How do I remove or disable the BerkleyDB dependency?<br/><br/>Thanks in advance.<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127302.html Tue, 28 Jan 2020 06:03:03 +0000 Re: Wide character in print at HTML::TreeBuilder::XPath function by John SJ Anderson &gt; That, I am very grateful to report, solved that question. I guess the <br/>&gt; scope of &quot;use utf8;&quot; is more narrow than I had thought. <br/> <br/>When you have a bit of time, sitting down and reading through https://github.com/rgs/p5-intelligible-unicode &lt;https://github.com/rgs/p5-intelligible-unicode&gt; is a really good investment in reducing future frustrations when working with Unicode in Perl. <br/> <br/>chrs, <br/>john. <br/> <br/> <br/> <br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127301.html Sun, 26 Jan 2020 18:35:53 +0000 Re: Wide character in print at HTML::TreeBuilder::XPath function by =?UTF-8?Q?Lars_Nood=c3=a9n?= On 1/26/20 9:58 AM, Lars Nood&eacute;n wrote:<br/>&gt; I&#39;ve got a long script that has &quot;use utf8;&quot; near the top. The script<br/>&gt; parses some HTML and then I run into trouble when printing the result as<br/>&gt; shown below:<br/>&gt; <br/>&gt; use utf8;<br/>&gt; use HTML::TreeBuilder::XPath;<br/>&gt; . . .<br/>&gt; my $xhtml = HTML::TreeBuilder::XPath-&gt;new;<br/>&gt; $xhtml-&gt;implicit_tags(1);<br/>&gt; $xhtml-&gt;no_space_compacting(1);<br/>&gt; $xhtml-&gt;parse_file($file)<br/>&gt; or die(&quot;Could not parse &#39;$file&#39; : $!\n&quot;);<br/>&gt; . . .<br/>&gt; print $html-&gt;as_XML_indented;<br/>&gt; . . .<br/>&gt; <br/>&gt; The exact error is:<br/>&gt; <br/>&gt; Wide character in print at ~/bin/script.pl line 147.<br/>&gt; <br/>&gt; It does not object to 99% of the material I&#39;ve run it over daily for<br/>&gt; months but something, somewhere in a recent file is causing the wide<br/>&gt; character problem. It&#39;s also causing it to mangle the UTF-8 parts.<br/>&gt; <br/>&gt; How do I get the HTML::TreeBuilder::XPath module to use UTF-8 all the<br/>&gt; way through?<br/>&gt; <br/>&gt; /Lars<br/>&gt; <br/><br/>It was pointed out off-list that I had missed the observation that the<br/>file being parsed can be forced into a UTF-8 interpretation:<br/><br/>&gt; my $filehandle;<br/>&gt; open ($filehandle, &quot;&lt; :encoding(UTF-8)&quot;, &quot;htmlfile.html&quot;) || die &quot;$1:<br/>error: $!&quot;;<br/>&gt; $xhtml-&gt;parse_file($filehandle);<br/><br/>That, I am very grateful to report, solved that question. I guess the<br/>scope of &quot;use utf8;&quot; is more narrow than I had thought. Thanks to all<br/>who took time to contemplate the problem.<br/><br/>/Lars<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127300.html Sun, 26 Jan 2020 16:25:13 +0000 Wide character in print at HTML::TreeBuilder::XPath function by =?UTF-8?Q?Lars_Nood=c3=a9n?= I&#39;ve got a long script that has &quot;use utf8;&quot; near the top. The script<br/>parses some HTML and then I run into trouble when printing the result as<br/>shown below:<br/><br/> use utf8;<br/> use HTML::TreeBuilder::XPath;<br/> . . .<br/> my $xhtml = HTML::TreeBuilder::XPath-&gt;new;<br/> $xhtml-&gt;implicit_tags(1);<br/> $xhtml-&gt;no_space_compacting(1);<br/> $xhtml-&gt;parse_file($file)<br/> or die(&quot;Could not parse &#39;$file&#39; : $!\n&quot;);<br/> . . .<br/> print $html-&gt;as_XML_indented;<br/> . . .<br/><br/>The exact error is:<br/><br/> Wide character in print at ~/bin/script.pl line 147.<br/><br/>It does not object to 99% of the material I&#39;ve run it over daily for<br/>months but something, somewhere in a recent file is causing the wide<br/>character problem. It&#39;s also causing it to mangle the UTF-8 parts.<br/><br/>How do I get the HTML::TreeBuilder::XPath module to use UTF-8 all the<br/>way through?<br/><br/>/Lars<br/> https://www.nntp.perl.org/group/perl.beginners/2020/01/msg127299.html Sun, 26 Jan 2020 07:58:46 +0000 Re: reading data from a web site by hw On Thursday, November 21, 2019 8:34:09 AM CET Olivier wrote:<br/>&gt; hw &lt;hw@gc-24.de&gt; wrote:<br/>&gt; &gt; On Wednesday, November 20, 2019 3:29:00 AM CET Olivier wrote:<br/>&gt; &gt; &gt; hw &lt;hw@gc-24.de&gt; writes:<br/>&gt; &gt; &gt; &gt; Hi,<br/>&gt; &gt; &gt; &gt; <br/>&gt; &gt; &gt; &gt; how can I read data from a web site which is using multiple frames and<br/>&gt; &gt; &gt; &gt; some<br/>&gt; &gt; &gt; &gt; javascript?<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Provided that the web site does not change too often and that they don&#39;t<br/>&gt; &gt; &gt; implement stupid &quot;security&quot; features, this should not be too complicate.<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Each frame is a web page, with it own URL. So you can examine the source<br/>&gt; &gt; &gt; code of the web page to find the URL of the first frame and second frame<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Them you can use any Perl library you like to load that URLand pars it<br/>&gt; &gt; &gt; for what you are looking for.<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Then use that data to load the second frame with a URL modified to<br/>&gt; &gt; &gt; include the type of data you have selected.<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Being frames makes it much easier, you hould not have to care about the<br/>&gt; &gt; &gt; javascript too much.<br/>&gt; &gt; <br/>&gt; &gt; The web site seems to be created by a program running on the server, i. e.<br/>&gt; &gt; there is not really a web site. When I access it with lynx or with<br/>&gt; &gt; WWW::Mechanize, the answer from the server says that neither frames, nor<br/>&gt; &gt; javascript is supported, and it is not possible to log in.<br/>&gt; <br/>&gt; Of course lynx cannot process frames. But that is not what I meant to<br/>&gt; tell you.<br/>&gt; <br/>&gt; Open the web page with your browser, FireFox, Chromium, whatever, the<br/>&gt; CTRL-U to display the source. In that source, you should see some tages<br/>&gt; &lt;frame ir maybe &lt;iframe which contains an URL.<br/><br/>When I do that, the login page is being displayed, and nothing happens when I <br/>press Ctrl-U. Maybe it&#39;s because the page is already made with frames?<br/><br/>When I look at the source of the frame that contains the fields to enter a <br/>username a password, I can see that there are inputs for those, like this:<br/><br/>&lt;INPUT TYPE=&quot;TEXT&quot; NAME=&quot;usrlogn&quot; VALUE=&quot;&quot; MAXLENGTH=&quot;15&quot; SIZE=&quot;8&quot;&gt;&amp;nbsp;<br/><br/>The only URL is probably the one displayed in the address bar of the web <br/>browser when looking at the source of the frame. That URL seems to point at <br/>the program running on the web server with parameters in the URL which have <br/>been created by the program. One of the parameters seems to be a session ID.<br/><br/>Instead of viewing the source of the frame, I can open the frame in other tab. <br/>How does that help me? There is no way to automatically get the URL for the <br/>frame because the parameters are being created by the program on the web <br/>server, and they are only valid for a short time.<br/><br/>&gt; Copy that URL and try to paste it in a separate window of your web browser.<br/>&gt; You should see the list of the topic you can select from. In fact it<br/>&gt; should display the contents of the 1st frame.<br/><br/>Well, yes, I can see the source of the frame that has the select list. That <br/>doesn&#39;t help me either because to get the data I want, I need to select <br/>entries from the select list. Selecting such an entry results in another <br/>frame being updated; that frame shows a table.<br/><br/>I can get the URL of that frame from the frame info of the web browser and <br/>download the frame and convert its table into a CSV and put the data into a <br/>database --- but I can not get the URL of the frame other than copying it <br/>manually from the frame info of the web browser.<br/><br/>&gt; If it does not, you are in a not too good shape.<br/>&gt; <br/>&gt; If it works, go back to the source code and locate the second &lt;frame<br/>&gt; tag, find the URL, copy, new window, paste.<br/>&gt; <br/>&gt; The concept is to access to the contens of the frames directly, without<br/>&gt; accessing the main page.<br/>&gt; <br/>&gt; Best regards,<br/>&gt; <br/>&gt; Olivier<br/>&gt; <br/>&gt; &gt; Can WWW::Mechanize somehow trick the server into assuming that frames and<br/>&gt; &gt; javascript are supported by the client?<br/><br/>Like I said, there are no frames to do anything with when the web site is <br/>being accessed with WWW::Mechanize.<br/><br/>I can only see that when I select an entry from the select list, the web <br/>browser sends a POST request for a subdocument and then right away makes a GET <br/>request for a style sheet. Unfortunately, the browser doesn&#39;t tell me what <br/>the POST request looks like. It should have something to do with what is <br/>selected from the list ...<br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127298.html Thu, 21 Nov 2019 12:27:30 +0000 Re: reading data from a web site by hw On Thursday, November 21, 2019 7:57:49 AM CET Shlomi Fish wrote:<br/>&gt; On Wed, 20 Nov 2019 19:52:46 +0100<br/>&gt; <br/>&gt; [...]<br/>&gt; &gt; Can WWW::Mechanize somehow trick the server into assuming that frames and<br/>&gt; &gt; javascript are supported by the client?<br/>&gt; <br/>&gt; Hi!<br/>&gt; <br/>&gt; See:<br/>&gt; <br/>&gt; https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ_<br/>&gt; with_ToC__generated.md#how-can-i-write-code-to-perform-operations-on-web-sit<br/>&gt; es-for-me-that-otherwise-should-be-done-manually<br/>&gt; <br/>&gt; (short URL: https://is.gd/ExAHTa )<br/><br/>There seems to be some agreement that selenium needs to be used. That seems <br/>to be some kind of huge IDE thing which may work or not and which may require <br/>years of trying to figure it out, if it&#39;s at all possible ...<br/><br/>Selenium doesn&#39;t even seem to be available in Fedora ...<br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127297.html Thu, 21 Nov 2019 11:17:56 +0000 Re: reading data from a web site by Olivier hw &lt;hw@gc-24.de&gt; wrote:<br/><br/>&gt; On Wednesday, November 20, 2019 3:29:00 AM CET Olivier wrote:<br/>&gt; &gt; hw &lt;hw@gc-24.de&gt; writes: <br/>&gt; &gt; &gt; Hi,<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; how can I read data from a web site which is using multiple frames and<br/>&gt; &gt; &gt; some<br/>&gt; &gt; &gt; javascript? <br/>&gt; &gt; <br/>&gt; &gt; Provided that the web site does not change too often and that they don&#39;t<br/>&gt; &gt; implement stupid &quot;security&quot; features, this should not be too complicate.<br/>&gt; &gt; <br/>&gt; &gt; Each frame is a web page, with it own URL. So you can examine the source<br/>&gt; &gt; code of the web page to find the URL of the first frame and second frame<br/>&gt; &gt; <br/>&gt; &gt; Them you can use any Perl library you like to load that URLand pars it<br/>&gt; &gt; for what you are looking for.<br/>&gt; &gt; <br/>&gt; &gt; Then use that data to load the second frame with a URL modified to<br/>&gt; &gt; include the type of data you have selected.<br/>&gt; &gt; <br/>&gt; &gt; Being frames makes it much easier, you hould not have to care about the<br/>&gt; &gt; javascript too much. <br/>&gt; <br/>&gt; The web site seems to be created by a program running on the server, i. e. <br/>&gt; there is not really a web site. When I access it with lynx or with <br/>&gt; WWW::Mechanize, the answer from the server says that neither frames, nor <br/>&gt; javascript is supported, and it is not possible to log in.<br/><br/>Of course lynx cannot process frames. But that is not what I meant to<br/>tell you.<br/><br/>Open the web page with your browser, FireFox, Chromium, whatever, the<br/>CTRL-U to display the source. In that source, you should see some tages<br/>&lt;frame ir maybe &lt;iframe which contains an URL.<br/><br/>Copy that URL and try to paste it in a separate window of your web browser.<br/>You should see the list of the topic you can select from. In fact it<br/>should display the contents of the 1st frame.<br/><br/>If it does not, you are in a not too good shape.<br/><br/>If it works, go back to the source code and locate the second &lt;frame<br/>tag, find the URL, copy, new window, paste.<br/><br/>The concept is to access to the contens of the frames directly, without<br/>accessing the main page.<br/><br/>Best regards,<br/><br/>Olivier<br/><br/><br/>&gt; <br/>&gt; Can WWW::Mechanize somehow trick the server into assuming that frames and <br/>&gt; javascript are supported by the client?<br/>--<br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127296.html Thu, 21 Nov 2019 07:37:45 +0000 Re: reading data from a web site by Shlomi Fish On Wed, 20 Nov 2019 19:52:46 +0100 <br/>hw &lt;hw@gc-24.de&gt; wrote: <br/> <br/>&gt; On Wednesday, November 20, 2019 3:29:00 AM CET Olivier wrote: <br/>&gt; &gt; hw &lt;hw@gc-24.de&gt; writes: <br/>&gt; &gt; &gt; Hi, <br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; how can I read data from a web site which is using multiple frames and <br/>&gt; &gt; &gt; some <br/>&gt; &gt; &gt; javascript? <br/>&gt; &gt; <br/>&gt; &gt; Provided that the web site does not change too often and that they don&#39;t <br/>&gt; &gt; implement stupid &quot;security&quot; features, this should not be too complicate. <br/>&gt; &gt; <br/>&gt; &gt; Each frame is a web page, with it own URL. So you can examine the source <br/>&gt; &gt; code of the web page to find the URL of the first frame and second frame <br/>&gt; &gt; <br/>&gt; &gt; Them you can use any Perl library you like to load that URLand pars it <br/>&gt; &gt; for what you are looking for. <br/>&gt; &gt; <br/>&gt; &gt; Then use that data to load the second frame with a URL modified to <br/>&gt; &gt; include the type of data you have selected. <br/>&gt; &gt; <br/>&gt; &gt; Being frames makes it much easier, you hould not have to care about the <br/>&gt; &gt; javascript too much. <br/>&gt; <br/>&gt; The web site seems to be created by a program running on the server, i. e. <br/>&gt; there is not really a web site. When I access it with lynx or with <br/>&gt; WWW::Mechanize, the answer from the server says that neither frames, nor <br/>&gt; javascript is supported, and it is not possible to log in. <br/>&gt; <br/>&gt; Can WWW::Mechanize somehow trick the server into assuming that frames and <br/>&gt; javascript are supported by the client? <br/>&gt; <br/> <br/>Hi! <br/> <br/>See: <br/> <br/>https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ_with_ToC__generated.md#how-can-i-write-code-to-perform-operations-on-web-sites-for-me-that-otherwise-should-be-done-manually <br/> <br/>(short URL: https://is.gd/ExAHTa ) <br/> <br/>Regards, <br/> <br/> Shlomi <br/> <br/> <br/>-- <br/> <br/>Shlomi Fish https://www.shlomifish.org/ <br/>https://github.com/shlomif/Freenode-programming-channel-FAQ <br/> <br/>Chuck Norris knows exactly which thing is rotten in the kingdom of Denmark. <br/> &mdash; http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ <br/> <br/>Please reply to list if it&#39;s a mailing list post - http://shlom.in/reply . <br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127295.html Thu, 21 Nov 2019 07:22:41 +0000 Re: reading data from a web site by Mike <br/>I think so:<br/>https://stackoverflow.com/questions/11501883/wwwmechanize-work-with-javascript<br/><br/>Well, maybe not:<br/>https://itworkarounds.blogspot.com/2011/07/automate-web-clicks-in-perl-with.html<br/><br/><br/><br/>Maybe this is better - maybe it isn&#39;t:<br/>https://metacpan.org/pod/WWW::Scripter::Plugin::JavaScript<br/><br/><br/>Mike<br/><br/><br/>On 11/20/19 12:52 PM, hw wrote:<br/>&gt; The web site seems to be created by a program running on the server, i. e.<br/>&gt; there is not really a web site. When I access it with lynx or with<br/>&gt; WWW::Mechanize, the answer from the server says that neither frames, nor<br/>&gt; javascript is supported, and it is not possible to log in.<br/>&gt;<br/>&gt; Can WWW::Mechanize somehow trick the server into assuming that frames and<br/>&gt; javascript are supported by the client?<br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127294.html Wed, 20 Nov 2019 23:41:51 +0000 Re: reading data from a web site by hw On Wednesday, November 20, 2019 3:29:00 AM CET Olivier wrote:<br/>&gt; hw &lt;hw@gc-24.de&gt; writes:<br/>&gt; &gt; Hi,<br/>&gt; &gt; <br/>&gt; &gt; how can I read data from a web site which is using multiple frames and<br/>&gt; &gt; some<br/>&gt; &gt; javascript?<br/>&gt; <br/>&gt; Provided that the web site does not change too often and that they don&#39;t<br/>&gt; implement stupid &quot;security&quot; features, this should not be too complicate.<br/>&gt; <br/>&gt; Each frame is a web page, with it own URL. So you can examine the source<br/>&gt; code of the web page to find the URL of the first frame and second frame<br/>&gt; <br/>&gt; Them you can use any Perl library you like to load that URLand pars it<br/>&gt; for what you are looking for.<br/>&gt; <br/>&gt; Then use that data to load the second frame with a URL modified to<br/>&gt; include the type of data you have selected.<br/>&gt; <br/>&gt; Being frames makes it much easier, you hould not have to care about the<br/>&gt; javascript too much.<br/><br/>The web site seems to be created by a program running on the server, i. e. <br/>there is not really a web site. When I access it with lynx or with <br/>WWW::Mechanize, the answer from the server says that neither frames, nor <br/>javascript is supported, and it is not possible to log in.<br/><br/>Can WWW::Mechanize somehow trick the server into assuming that frames and <br/>javascript are supported by the client?<br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127293.html Wed, 20 Nov 2019 18:53:03 +0000 Re: reading data from a web site by Olivier hw &lt;hw@gc-24.de&gt; writes:<br/><br/>&gt; Hi,<br/>&gt;<br/>&gt; how can I read data from a web site which is using multiple frames and some <br/>&gt; javascript?<br/><br/>Provided that the web site does not change too often and that they don&#39;t<br/>implement stupid &quot;security&quot; features, this should not be too complicate.<br/><br/>Each frame is a web page, with it own URL. So you can examine the source<br/>code of the web page to find the URL of the first frame and second frame<br/><br/>Them you can use any Perl library you like to load that URLand pars it<br/>for what you are looking for.<br/><br/>Then use that data to load the second frame with a URL modified to<br/>include the type of data you have selected.<br/><br/>Being frames makes it much easier, you hould not have to care about the<br/>javascript too much.<br/><br/>Olivier<br/><br/>&gt; When using a web browser, I need to log in into the web site and follow a <br/>&gt; couple links to finally get to the page I want. This page I need to get data <br/>&gt; from has a frame with a select list and another frame displaying a table. By <br/>&gt; default, the table contains data corresponding to the first entry in the <br/>&gt; select list. Selecting an entry from the select list reloads the table in the <br/>&gt; other frame once I click on the entry.<br/>&gt;<br/>&gt; I need to automatically pick all the entries from the select list one after <br/>&gt; another so that the table is being updated. Once I&#39;ve read the new table, the <br/>&gt; next entry in the select list needs to be picked to get the table updated, <br/>&gt; until there are no more entries. The order in which the entries are being <br/>&gt; picked can be random.<br/>&gt;<br/>&gt; Once all the available tables are read, only the first entry in the select <br/>&gt; needs to be read once per day. &quot;Reading the table&quot; means that I need to put <br/>&gt; the data in the table into a database. It would help if could save all the <br/>&gt; tables to files and convert the files later; the problem is getting the <br/>&gt; tables.<br/>&gt;<br/>&gt; Is this even possible? There doesn&#39;t seem be any useful support for <br/>&gt; javascript with WWW::Mechanize, and even frames seem to be an issue.<br/>&gt;<br/>&gt; I can only see that some java (or javascript or whatever it is) function is <br/>&gt; being called when clicking on an entry in the select list the only purpose of <br/>&gt; which seems to be to display a banner showing &quot;Loading ...&quot; with the dots <br/>&gt; moving while the table is being loaded. Yet the table is being updated. I <br/>&gt; can&#39;t see how and if there are GET or POST requests being sent by the web <br/>&gt; browser. The only way to update seems to be to somehow fake a click on an <br/>&gt; entry in the select list.<br/>&gt;<br/>&gt; Any ideas?<br/><br/>-- <br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127292.html Wed, 20 Nov 2019 02:37:44 +0000 Re: about package method returns by hw On Friday, November 1, 2019 1:49:31 AM CET Maggie Q Roth wrote:<br/>&gt; If Net::Ping gets failure and has the special statement for the failure,<br/>&gt; how can return this statement to the caller?<br/><br/>The ping() method never fails, see https://metacpan.org/pod/Net::Ping . <br/>Return returns by returning, like this:<br/><br/><br/>sub pongping {<br/> return Net::Ping-&gt;new()-&gt;ping(shift);<br/>}<br/><br/><br/>my $statement = pongping(&#39;example.com&#39;);<br/>if(defined($statement)) {<br/> printf(&quot;%s\n&quot;, $statement ? &#39;pong&#39; : &#39;unreached&#39;);<br/>} else {<br/> print &quot;invalid ping target\n&quot;;<br/>}<br/> https://www.nntp.perl.org/group/perl.beginners/2019/11/msg127291.html Tue, 19 Nov 2019 19:08:28 +0000