]> iEval git - text-homestuck.git/blame_incremental - lib/Text/Homestuck.pm
Improve code
[text-homestuck.git] / lib / Text / Homestuck.pm
... / ...
CommitLineData
1package Text::Homestuck;
2
3use 5.014000;
4use strict;
5use warnings;
6use parent qw/Exporter/;
7our @EXPORT = qw/aradia tavros sollux karkat nepeta kanaya terezi vriska equius gamzee eridan feferi/;
8our $VERSION = '0.000_001';
9
10sub filter {
11 my ($name, $code) = @_;
12 no strict 'refs';
13 *{$name} = sub (;$){
14 local *__ANON__ = $name;
15 if ($_[0]) {
16 local $_ = $_[0];
17 $code->();
18 $_
19 } else {
20 $code->();
21 $_
22 }
23 }
24}
25
26filter aradia => sub {
27 y/A-Z/a-z/;
28 y/,.?//d;
29 s/o/0/g;
30};
31
32filter tavros => sub {
33 y/a-zA-Z.!?/A-Za-z,,,/;
34 s/:\)/}:)/g;
35};
36
37filter sollux => sub {
38 y/A-Z/a-z/;
39 y/s/2/;
40 s/i/ii/g;
41 s/to/two/g;
42 s/\b(fuck|joke|kk|aa)\b/\U$1/g;
43};
44
45filter karkat => sub {
46 y/a-z/A-Z/;
47 s/\bD:/D:B/;
48};
49
50filter nepeta => sub {
51 y/A-Z/a-z/;
52 s/ee/33/;
53 $_ = ":33 < $_";
54};
55
56filter kanaya => sub {
57 y/,.!?'//d;
58 s/\b(\w)/\u$1/g;
59};
60
61filter terezi => sub {
62 y/a-z/A-Z/;
63 y/AIE/413/;
64 s/(!|\?)/$1$1/g;
65 s/:\]|:\)/>:]/g;
66};
67
68filter vriska => sub {
69 y/Bb/88/;
70 s/:\)/::::\)/g;
71 s/D:/D::::/g;
72};
73
74filter equius => sub {
75 s/strong/STRONG/g;
76 s/strength/STRONGNESS/g;
77 s/x/%/ig;
78 s/loo/100/ig;
79 s/ool/001/ig;
80 s/[?.!]$//;
81 $_ = "D --> $_";
82};
83
84filter gamzee => sub {
85 y/[A-Z]/[a-z]/;
86 s/([a-z])(.)/$1\u$2/g;
87 s/:\)/:o\)/g;
88};
89
90filter eridan => sub {
91 y/',.?!//d;
92 s/w/ww/g;
93 s/v/vv/g;
94 s/ing/in/g;
95 s/want to/wanna/g;
96 s/going to/gonna/g;
97};
98
99filter feferi => sub {
100 s/H/)(/g;
101 s/E/-E/g;
102 s/:\)/38)/g;
103};
104
1051;
106__END__
107# Below is stub documentation for your module. You'd better edit it!
108
109=head1 NAME
110
111Text::Homestuck - Perl extension for blah blah blah
112
113=head1 SYNOPSIS
114
115 use Text::Homestuck;
116 blah blah blah
117
118=head1 DESCRIPTION
119
120Stub documentation for Text::Homestuck, created by h2xs. It looks like the
121author of the extension was negligent enough to leave the stub
122unedited.
123
124Blah blah blah.
125
126=head2 EXPORT
127
128None by default.
129
130
131
132=head1 SEE ALSO
133
134Homestuck: L<http://mspaintadventures.com/?s=6&p=001901>
135The mspa wiki page listing the quirks: http://mspaintadventures.wikia.com/wiki/Typing_Quirk
136
137=head1 AUTHOR
138
139Marius Gavrilescu, E<lt>marius@E<gt>
140
141=head1 COPYRIGHT AND LICENSE
142
143Copyright (C) 2014 by Marius Gavrilescu
144
145This library is free software; you can redistribute it and/or modify
146it under the same terms as Perl itself, either Perl version 5.18.2 or,
147at your option, any later version of Perl 5 you may have available.
148
149
150=cut
This page took 0.023768 seconds and 4 git commands to generate.