cpan you have to see

2012-12-12 Thread Alexej Magura
Okay, allow me to clarify what the TrueFalse module that I wrote is trying
to emulate.  It's trying to emulate the 'true' and 'false' user commands
available under Linux.

Haven't you ever done something like this in Unix Shell?

while true; do ls /var/log/; sleep 5s; clear; done

The statment 'true' in this example, as far as I know, only returns true
and that's it.  It may not look very useful, but it can be useful when
you just need to do something and just want to write 'Just because I
said so, keep doing A until I say stop.'

I'm sorry if all of you think that my modules are poorly written, but if
you want me to take you seriously, then say something productive for a
change, that is make some suggestions (I'm open to suggestions.)


Re: cpan you have to see

2012-12-12 Thread Alexej Magura
As for my rt replies, what did you expect I was gonna say: 'Oh, my bad I
wrote the worst module in the world and you're the king of all; here let me
just remove it real quick.'?  Think again.

*When I call `true()` I get `undef` back (or empty list in list context).
It should return `i should stop uploading useless modules` instead.*
Is not a valid bug ticket, and it is not remotely funny.  Imagine how all
of you would feel if you had just signed up for Cpan because you thought it
would be neat to be helpful and contribute something to the perl community
only to have the entire community turn on you.  So much for There's more
than one way to do it. (Perl's motto) More like If you don't get it right
the first time, never try again.

Since I joined Cpan, I've only received one bug ticket that was actually
helpful, and I've received four total, to my knowledge.

On Wed, Dec 12, 2012 at 12:05 PM, Alexej Magura perl...@cpan.org wrote:

 Okay, allow me to clarify what the TrueFalse module that I wrote is trying
 to emulate.  It's trying to emulate the 'true' and 'false' user commands
 available under Linux.

 Haven't you ever done something like this in Unix Shell?

 while true; do ls /var/log/; sleep 5s; clear; done

 The statment 'true' in this example, as far as I know, only returns true
 and that's it.  It may not look very useful, but it can be useful when
 you just need to do something and just want to write 'Just because I
 said so, keep doing A until I say stop.'

 I'm sorry if all of you think that my modules are poorly written, but if
 you want me to take you seriously, then say something productive for a
 change, that is make some suggestions (I'm open to suggestions.)



Re: london.pm Digest, Vol 86, Issue 13

2012-12-12 Thread Alexej Magura
:
  Speakers of a natural language are allowed to have differing skill
 levels, to speak different subsets of the language, to learn as they go,
 and, generally, to put the language to good use before they know the whole
 language.  You don't know all of Perl yet, just as you don't know all of
 English.  But that's Officially Okay in Perl culture.  You can work with
 Perl usefully, even though we haven't even told you how to write your own
 subroutines yet.

 And, yes, I think that applies even to code published on CPAN.
 If there are *bugs*, report them.



 --

 Message: 5
 Date: Wed, 12 Dec 2012 19:35:03 +0100
 From: Abigail abig...@abigail.be
 Subject: Re: cpan you have to see
 To: London.pm Perl M\[ou\]ngers london.pm@london.pm.org
 Message-ID: 20121212183503.GA25786@almanda
 Content-Type: text/plain; charset=us-ascii

 On Wed, Dec 12, 2012 at 10:57:39AM -0500, Uri Guttman wrote:
  On 12/12/2012 07:12 AM, Leon Brocard wrote:
  On Wed, Dec 12, 2012 at 02:29:24AM -0500, Uri Guttman wrote:
  i can't say much about this but you have to look at the code here.
 
  https://metacpan.org/author/PERLOOK/
 
  I congratulate Alexej on joining the CPAN authors club. Instead of
 making fun
  of him on a mailing list why not engage with him and help him improve?
 
  look at his early rt ticket replies. and i did engage him and admonish
  his attitude. his reply was more normal but he still thinks his code is
  doing something useful and even correct. i will point him in better
  directions later today.
 
  but he should be learning basic perl on his own box and wait for
  publishing until he has something to show. what is up there is very
  broken ('#' is false in his world) and he doesn't know it.


 The power of CPAN is that it is available to *ALL*.

 Noone is forcing you to use what's there. If you think it's crappy, don't
 use it. If it pisses you off people prefer to use a module that you think
 is crappy, write something better. After all, most people just want to
 fix a problem, and they don't (usually rightly) how it's solved.

 If only code that is approved by a cabal is allowed on CPAN, it will
 quickly become something else then it's now.



 Abigail


 --

 Message: 6
 Date: Wed, 12 Dec 2012 19:09:55 +
 From: Peter Sergeant p...@clueball.com
 Subject: Re: cpan you have to see
 To: London.pm Perl M[ou]ngers london.pm@london.pm.org
 Message-ID:
 CAHyrgodKxjVrfUvQaYH2Ymy_2Bz5T283sKva-xRd=560iiq=
 i...@mail.gmail.com
 Content-Type: text/plain; charset=ISO-8859-1

 On Wed, Dec 12, 2012 at 6:14 PM, Gareth Harper spansh+lon...@gmail.com
 wrote:

  On 12 December 2012 17:57, Joseph Werner telco...@gmail.com wrote:
   On Wed, Dec 12, 2012 at 12:45 PM, Gareth Harper 
 spansh+lon...@gmail.com
  wrote:
  
   PBP and I disagree with you on this one, Gareth. When a sub does a
   return 0; to a list context, that is interpreted as true.  A bare
   return; is best practice.
  
 
  I stand corrected.
 

 Don't stand corrected too quickly - the idea that you should always use a
 bare *return()* is far from universally accepted - you can bite yourself
 just as easily in reverse by using bare return, and getting an empty list
 where you expected a false or undefined value:

 https://gist.github.com/4270506

 The boolean argument is reaching, at best. Perl programmers frequently use
 numeric 0 as a false value, and yet no-one is saying you should write code
 like:

 sub lock_count {
 if ( $lock_counter ) {
  return $lock_counter;
 } else {
  return;
 }
 }

 Just in case someone has decided to take your input in to an array,
 before asking if lock_count is true.

 If you're using a bare return then all your returns should be
 *wantarray*dependent, or you're making the code even less predictable
 - making the
 *return* of an undefined value the only context-dependent *return* in a sub
 is crazy talk!

 The simple rule here is: write functions that return either a list, or a
 scalar, and not both, and be explicit in your function documentation which
 you're expecting to return.

 -P


 --

 Message: 7
 Date: Wed, 12 Dec 2012 19:53:34 +
 From: Hakim Cassimally hakim.cassima...@gmail.com
 Subject: Re: cpan you have to see
 To: London.pm Perl M[ou]ngers london.pm@london.pm.org
 Message-ID:
 
 cam-p+0uqj9yvq8rdm4yvra36-vmjk45iwqwjw1+kxmsilh9...@mail.gmail.com
 Content-Type: text/plain; charset=UTF-8

 Hi Alex,

 I'm sorry that you've had a bad initial experience of CPAN and now of
 this mailing list.

 On 12 December 2012 17:21, Alexej Magura perl...@cpan.org wrote:
  As for my rt replies, what did you expect I was gonna say: 'Oh, my bad I
  wrote the worst module in the world and you're the king of all; here let
 me
  just remove it real quick.'?  Think again.

 The RT commenter who wrote:

 This isn't python's pypi where everybody is encouraged to upload for
 fun whether useful or not. Only upload something