[toulouse-pm] Parrot et patch

Michel Rodriguez mrodrigu at mirlin.xmltwig.com
Mon Aug 12 05:30:28 CDT 2002


Salut,

Pour ceux qui s'interessent a Parrot, il parait qu'il y en a par ici:

Une thread sur PerlMonks: http://perlmonks.org/index.pl?node_id=189187
Une presentation d'Acme: http://www.astray.com/targeting_parrot/
La Perl review, http://theperlreview.com/issues/ a plusieurs articles
sur Parrot.

Et pis bieng sur ya http://www.parrotcode.org/ avec une FAQ et pleins de
liens.

Et pis en fouinant sur CPAN j'ai trouve cette liste de scripts:
http://www.cpan.org/scripts/UNIX/System_administration/ j'aime notamment
http://www.cpan.org/authors/id/S/SB/SBURKE/crontab2english_0.71.pl qui
traduit les lignes de la crontab en anglais normal (la traduction en
Francais est un exercice pour le lecteur). Je l'ai quand meme patche
pour que en mode -f les commentaires soient avant les lignes de la
crontab:

--- crontab2english_0.71.pl     Mon Aug 12 09:48:57 2002
+++ crontab2english_0.72.pl     Mon Aug 12 09:49:32 2002
@@ -335,7 +335,7 @@
 {
   my(@bits,$k,$v);
   foreach (@lines) {
-    print $_ if $filter;
+    my $original_line= $_;
     chomp;
     DEBUG > 1 and print "Line: <$_>\n";
     ++$line_number;
@@ -377,6 +377,7 @@
         print "Unparseable line (#$line_number): \"", esc($_), "\"\n";
       }
     }
+    print $original_line if $filter;
   }
   exit;
 }

D'ailleurs j'y connais pas grand chose en patchage, j'ai genere celui la
avec:
LC_ALL=C TZ=UTC0 \
diff -Nau  crontab2english_0.71.pl crontab2english_0.72.pl \
> patch_crontab2english

et je l'applique avec: 
patch <patch_crontab2english_0.72

ce qui me modifie le fichier original, j'ai essaye de faire
patch -o crontab2english_0.72.pl <patch_crontab2english_0.72
mais ca marche pas (le fichier crontab2english_0.72.pl est vide)

Ya des pros de patch dans le coin? Ou je vais directement pleurer chez
le CULTe? (ou chercher sur Google)

-- 
Michel Rodriguez
Perl &amp; XML
http://www.xmltwig.com




More information about the Toulouse-pm mailing list