in reply to Re: RFC: Net::SNTP::Server v1
in thread RFC: Net::SNTP::Server v1

Hello Monk::Thomas,

First of all thank you for your time and effort reading and reviewing my code. I am not an expert and it is good that you point out this error to me so I can modify the code and updated to a better hopefully version.

Regarding Nested Functions, I found this tutorial Creating Nested Functions, from where I modified my functions to local hopefully this is better now and more memory efficient.

Regarding your comment:

I would not want to touch this module with a ten-foot pole. I wasn't even looking very hard.

Is is to so badly written the module? What is so wrong that would make you not want to use this module?

Again, thank you for time and appreciate your effort.

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

Replies are listed 'Best First'.
Re^3: RFC: Net::SNTP::Server v1
by Monk::Thomas (Friar) on Jul 20, 2015 at 15:01 UTC

    Regarding Nested Functions, I found this tutorial Creating Nested Functions, from where I modified my functions to local hopefully this is better now and more memory efficient.

    If you're concerned about optimized memory consumption for an 8 line function, then you probably should use something else. (e.g. finely tuned C code) My recommendation: Optimize for readability / maintainability. You like to publish the module so that someone else might use it. This someone else might have an anger management problem, an axe and your address. ;)

    Is is to so badly written the module? What is so wrong that would make you not want to use this module?

    It's trust related. If I use someone else's code then I must be sure the code is doing what it's supposed to do. Easy to understand code and suitable application of common language idioms help to build that trust. (Hey! I can understand that!) Automated tests are also nice. (Hey! I don't understand it, but it's seems to be working as expected.) Your code simply fails to build that trust.

    'Three strikes and you are out:'

    1. Trying to reinvent printf, especially even though you already use it.
    2. Code that does not seem to be used.
    3. Failing to validate user input.

    No trust -> that code is not going to end up on any of my machines. I may want to play around with it for educational purposes, but it's not going to be something I rely on.