| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Acme::Ognon; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf8 |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Acme::Ognon - Suivez le Conseil supérieur de la langue française ... peut-être |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 VERSION |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
1990.7 |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Acme::Ognon existe pour suivre le Conseil supérieur de la langue française |
|
16
|
|
|
|
|
|
|
à la lettre... peut-être. Le module supprime et ajoute, de temps en temps, |
|
17
|
|
|
|
|
|
|
des accents circonflexes sur les lettres S<« i »> et S<« u »>. |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Le module a deux S C pour supprimer des accents |
|
20
|
|
|
|
|
|
|
circonflexes et C pour en ajouter. Gardez à l'esprit que ces |
|
21
|
|
|
|
|
|
|
opérations ne s'effectuent que de temps en temps. |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use Acme::Ognon qw/ ognon oignon /; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $peut_etre_sans_accent_circonflexe = ognon( 'coût' ); |
|
28
|
|
|
|
|
|
|
my $peut_etre_avec_accent_circonflexe = oignon( 'cout' ); |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
|
31
|
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
|
15988
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
29
|
|
|
33
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
40
|
|
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
require Exporter; |
|
36
|
1
|
|
|
1
|
|
4
|
use vars qw/ @ISA @EXPORT_OK @EXPORT /; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
307
|
|
|
37
|
|
|
|
|
|
|
@ISA = qw/ Exporter /; |
|
38
|
|
|
|
|
|
|
@EXPORT = qw/ ognon oignon /; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
$Acme::Ognon::VERSION = "1990.7"; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub ognon { |
|
43
|
2000
|
|
|
2000
|
0
|
3162
|
my ( $text ) = @_; |
|
44
|
|
|
|
|
|
|
|
|
45
|
2000
|
100
|
|
|
|
2388
|
$text =~ s/î/i/g if rand(10) > 5; |
|
46
|
2000
|
100
|
|
|
|
2167
|
$text =~ s/Î/I/g if rand(10) > 5; |
|
47
|
2000
|
100
|
|
|
|
2313
|
$text =~ s/û/u/g if rand(10) > 5; |
|
48
|
2000
|
100
|
|
|
|
2465
|
$text =~ s/Û/U/g if rand(10) > 5; |
|
49
|
|
|
|
|
|
|
|
|
50
|
2000
|
|
|
|
|
2120
|
return $text; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub oignon { |
|
54
|
2000
|
|
|
2000
|
0
|
4336
|
my ( $text ) = @_; |
|
55
|
|
|
|
|
|
|
|
|
56
|
2000
|
100
|
|
|
|
2288
|
$text =~ s/i/î/g if rand(10) > 5; |
|
57
|
2000
|
100
|
|
|
|
2261
|
$text =~ s/I/Î/g if rand(10) > 5; |
|
58
|
2000
|
100
|
|
|
|
2407
|
$text =~ s/u/û/g if rand(10) > 5; |
|
59
|
2000
|
100
|
|
|
|
2426
|
$text =~ s/U/Û/g if rand(10) > 5; |
|
60
|
|
|
|
|
|
|
|
|
61
|
2000
|
|
|
|
|
2052
|
return $text; |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 REMERCIEMENTS |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Merci au Conseil supérieur de la langue française, bien S Hein, |
|
67
|
|
|
|
|
|
|
bien S Je pense... |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 VOIR AUSSI |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTEUR |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Lee Johnson - C |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 LICENCE |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Cette bibliothèque est un logiciel S vous pouvez la redistribuer et/ou |
|
80
|
|
|
|
|
|
|
la modifier selon les mêmes conditions que Perl lui-même. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Si vous souhaitez contribuer (documentation, fonctionnalités, corrections de |
|
83
|
|
|
|
|
|
|
bugs, etc), merci de soumettre un I ou de remplir un ticket à |
|
84
|
|
|
|
|
|
|
l'adresse S |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
https://github.com/leejo/acme-ognon |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |