in reply to RFC: Net::SNTP::Client v1

Some suggestions:

Replies are listed 'Best First'.
Re^2: RFC: Net::SNTP::Client v1
by thanos1983 (Parson) on Jun 30, 2015 at 17:19 UTC

    Hello toolic,

    Thank you for your time and effort reading and reviewing my proposed module. I will read as you suggest the Pod and I will update accordingly. The reason That I am having two use inside the sub is that I am trying to utilize minimum possible RAM memory, since the moment that you call a module it is loaded in the memory (correct?).

    Hmmm I did not even thought about it:

    You should consider adding some checks on the inputs to your getSNTPTime sub.

    Good idea.

    Seeking for Perl wisdom...on the process of learning...not there...yet!
      The reason That I am having two use inside the sub is that I am trying to utilize minimum possible RAN memory, since the moment that you call a module it is loaded in the memory (correct?).
      I don't think that is correct. From use:
      Because use takes effect at compile time, it doesn't respect the ordinary flow control of the code being compiled. In particular, putting a use inside the false branch of a conditional doesn't prevent it from being processed.

        Note for future: use applies only to the current scope in Perl 6.

        Done ;)

        Seeking for Perl wisdom...on the process of learning...not there...yet!
      The reason That I am having two use inside the sub is that I am trying to utilize minimum possible RAM memory, since the moment that you call a module it is loaded in the memory (correct?).

      If you require them instead of use them, then the module will only be loaded when you need them.

      For example, a number of CPAN module use the following as "front ends" to Carp so Carp is only loaded is needed.

      sub _carp { require Carp; Carp::carp(@_); } sub _croak { require Carp; Carp::croak(@_); }

        Hello RonW,

        Thank you for your time and effort reading/reviewing my code.

        Nice tip, I was not aware of it. :D

        Seeking for Perl wisdom...on the process of learning...not there...yet!