Skip Menu |

This queue is for tickets about the Net-SNTP-Client CPAN distribution.

Report information
The Basics
Id: 130827
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Net-SNTP-Client

People
Owner: garyfalos [...] cpan.org
Requestors: sparvu [...] kronometrix.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.23



Subject: SNTP client question
Date: Sun, 27 Oct 2019 17:13:46 +0200
To: bug-Net-SNTP-Client [...] rt.cpan.org
From: Stefan Parvu <sparvu [...] kronometrix.org>
Hi, Im trying to understand why your module wont let me fetch any data from any NTP server I have tried. Have a look. Im just using the sample code from your module #!/opt/kronometrix/perl/bin/perl use strict; use warnings; use Data::Dumper; use Net::SNTP::Client qw ( getSNTPTime ); my %hashInput = ( -hostname => "0.pool.ntp.org", -port => 123, -timeOutInput => 10, -RFC4330 => 1, -clearScreen => 1, ); my ( $error , $hashRefOutput ) = getSNTPTime( %hashInput ); print Dumper $hashRefOutput; print "Error: $error\n" if ($error); which always returns: Error: Not defined key(s) Any ideas what is this ? Im using the following setup: latest Net::SNTP::Client module perl 5.30.0 linux 64bit debian 7 Linux debian7 3.2.0-4-amd64 #1 SMP Debian 3.2.93-1 x86_64 GNU/Linux debian 7.11 Thank you, Stefan Parvu sparvu@kronometrix.org
On Sun Oct 27 16:30:47 2019, sparvu@kronometrix.org wrote: Hello Stefan, Thank you for reporting this error. It is a minor typo mistake on my latest update that I did on the module. The error is coming from the key parameter: -timeOutInput it should be -timeOut. Try the following sample of code: my %hashInput = ( -hostname => "0.pool.ntp.org", -port => 123, -timeOut => 10, -RFC4330 => 1, -clearScreen => 1, ); my ( $error , $hashRefOutput ) = getSNTPTime( %hashInput ); print Dumper $hashRefOutput; print "Error: $error\n" if ($error); I will produce another release as soon as I get some time tomorrow or the day after to update this minor problem. Let me know if you have any further problems. BR / Thanos Show quoted text
> Hi, > > Im trying to understand why your module wont let me fetch any data > from any NTP server I have tried. > Have a look. Im just using the sample code from your module > > #!/opt/kronometrix/perl/bin/perl > use strict; > use warnings; > use Data::Dumper; > > use Net::SNTP::Client qw ( getSNTPTime ); > > my %hashInput = ( > -hostname => "0.pool.ntp.org", > -port => 123, > -timeOutInput => 10, > -RFC4330 => 1, > -clearScreen => 1, > ); > > my ( $error , $hashRefOutput ) = getSNTPTime( %hashInput ); > > print Dumper $hashRefOutput; > print "Error: $error\n" if ($error); > > > which always returns: > > Error: Not defined key(s) > > > Any ideas what is this ? Im using the following setup: > latest Net::SNTP::Client module > perl 5.30.0 linux 64bit debian 7 > Linux debian7 3.2.0-4-amd64 #1 SMP Debian 3.2.93-1 x86_64 GNU/Linux > debian 7.11 > > Thank you, > > Stefan Parvu > sparvu@kronometrix.org
Documentation updated on next release.