Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: pp only to create executable when source has changed (pseudocode)

by LanX (Canon)
on Dec 02, 2012 at 20:20 UTC ( #1006755=note: print w/ replies, xml ) Need Help??


in reply to Re: pp only to create executable when source has changed
in thread pp only to create executable when source has changed

Sorry but

    if (-m $source > -m $exe) {

where do I find the docs of this -m function?

UPDATE:

     while (my ($source, $exe) = keys %files) {

did you really mean keys? not each?

         my ($source, $exe) = splice(@ARGV, 0, 2);

and now your directly overwriting the loop vars?

Cheers Rolf


Comment on Re^2: pp only to create executable when source has changed (pseudocode)
Select or Download Code
Re^3: pp only to create executable when source has changed (pseudocode)
by muba (Priest) on Dec 06, 2012 at 17:48 UTC

    You raise valid points. -m should have been -M, keys should have been each, and that splice line shouldn't be there at all. My bad.

      Thanks for pointing me to -M, I didn't know that it exists.

      OTOH it's practically useless because it only counts in days, it's very hard to imagine a valid usecase!

      (Beside maybe log-rotation on a daily basis)

      forget my last remarks, wrong tests indicated complete days, but actually floats are fine!

      Cheers Rolf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2014-09-30 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (370 votes), past polls