Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Auto-updating snippets.

by TilRMan (Friar)
on Jul 16, 2004 at 00:44 UTC ( #374862=note: print w/ replies, xml ) Need Help??

in reply to Auto-updating snippets.

While I disagree with the idea of replacing modules with snippets, the auto-update system itself might be interesting. It sounds like search-and-replace on crack, with syntactical sugar for Perl parsing. I can easily imagine using such a beast for bandaging broken code long enough for me to do proper refactoring.

I assume that the system would be smart enough to find snippets on its own, so that old scripts can be udpated. In other words, if you have to say #This is snippet number 927307, it'll never work.

The system becomes quite valuable, IMHO, when you starting thinking in terms of idioms instead of snippets. For example, I propose the first "snippet" should be:


and also propose the first update (to same snippet):

$| = 1

See, among other discussions, Re: Poor Perl Idioms Explained (except not really).

Update: Wassercrats: I accept your terms, with the following addition: If I contribute, you must implement it. :-)

Comment on Re: Auto-updating snippets.
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://374862]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-09-18 05:10 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (108 votes), past polls