Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^3: PERL as shibboleth and the Perl community

by rir (Vicar)
on Nov 24, 2005 at 21:50 UTC ( #511542=note: print w/replies, xml ) Need Help??

in reply to Re^2: PERL as shibboleth and the Perl community
in thread PERL as shibboleth and the Perl community

Sorry I was obscure. Please note that that paragraph was designated Humor and not to be taken too seriously. I learned Perl from the first two Camel Books, very roughly from the first edition and with a little depth from the second. So I emulated the code presented there, specifically the bits return bless {}, ref( $self) || $self; and sub AUTOLOAD seemed to be recommended by the authors. So I used them, this was cargo culting. The cuteness and convenience of the constructs seduced me; obviously I was not alone. Now I would be more cognizant that a manual's authors obligation to demonstrate the features of a language surpasses their duty to instruct the reader about when to use the various features. Wall, Chrisiansen, and Schwartz wrote it and I imitated it--cargo cult.

If I use Perl over PERL because well respected members of perlmonks indicate that it is proper that, again, is imitation. Again based on deference to authority--cargo cult. In my case my recollection of the pink Camel is that it presented PERL as much an acronym as BASIC. That I discount my own memory makes it an exceptional case of cultism. That Perlers will think me foolish for the former and fine for the latter does amuse me slightly.

Regarding use strict; I had used perl as a replacement for awk, sed, and sh. I complained of the non-scalability of perl and was clued to the creation of the strict pragma. That increased my interest in Perl. My usage of strict is not cargo cultism, I avoided writing all but small scripts because I understood all too well some of the problems that it deals with.

just because something is considered good style and [is] widely followed in a community does not make following it mere cargo cult.

I say if such prejudices or judgements of the herd, or herd leaders, are the only reasons one follows a practice it is mere cargo cult. I do not disdain cargo cultism. I understand the negative connotations but do not give them weight. Some cargo culting is unavoidable. We learn by doing so we may be doing something we do not much understand, if it works for us and others it may go unquestioned by many. There is an efficiency in that.

Be well,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://511542]
[Corion]: ambrus: Yes but I also need to implement the file / IO watcher, because Prima has that (in Prima::File), and I need to supply the appropriate thing to make push_write etc. work with Prima
[ambrus]: Corion: yes, you need to implement the io watcher, which should be simple because Prima::File is basically that, and the timer watcher form Prima::Timer
[Corion]: ... or so I think. As I said, I'm somewhat vague on how to make AnyEvent cooperate with a callback-driven IO event loop that gives me callbacks when data is available or can be written
[ambrus]: what push_write thing? I don't think you need that. that's implemented generically by AnyEvent::Handle
[Corion]: ambrus: Yeah, that's what I think as well. But you give me an idea, maybe I should start with implementing the timer, as that should be far simpler and with fewer edge-cases/nasty interaction than the file watcher
[ambrus]: You only provide the watcher part that tells when the handle is readable or writable, not the actual writing and reading.
[Corion]: ambrus: Hmmm. It makes sense that AnyEvent would implement the push_write itself, but I think I don't have a good idea of where the boundary between AnyEvent and the underlying event system lies... Implementing the timer should give me a better idea
[ambrus]: Corion: push_write is in the higher level abstraction of AnyEvent::Handle, not in the watcher
[Corion]: ambrus: Hmm - rereading Prima::File, that merrily coincides with what Prima does - it tells you "you can read", and you're supposed to read from the fh yourself. I thought it called you with the data already read, which would've been harder to integrate
[ambrus]: you just need an io watcher, created by &AnyEvent::Impl:: Whatever::io(...)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2016-12-08 12:18 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (141 votes). Check out past polls.