line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#-------------------------------------------------------------------------# |
2
|
|
|
|
|
|
|
# Acme::Playwright |
3
|
|
|
|
|
|
|
# Date Written: 21-Mar-2002 04:15:52 PM |
4
|
|
|
|
|
|
|
# Last Modified: 26-Mar-2002 09:32:37 AM |
5
|
|
|
|
|
|
|
# Author: Kurt Kincaid |
6
|
|
|
|
|
|
|
# Copyright (c) 2002, Kurt Kincaid |
7
|
|
|
|
|
|
|
# All Rights Reserved |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# NOTICE: This is free software and may be modified and/or redistributed |
10
|
|
|
|
|
|
|
# under the same terms as Perl itself. |
11
|
|
|
|
|
|
|
#-------------------------------------------------------------------------# |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Acme::Playwright; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
7033
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
16
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
17
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
52
|
|
18
|
1
|
|
|
|
|
3316
|
use vars qw/ $name $val %Names %Phrases %rNames %rPhrases |
19
|
|
|
|
|
|
|
@Names @Actions @nSpace @pSpace @nA @pA @nE @pE |
20
|
|
|
|
|
|
|
@nN @pN @nO @pO @nR @pR @nS @pS @nT @pT %Delimiter |
21
|
1
|
|
|
1
|
|
5
|
$AUTOLOAD /; |
|
1
|
|
|
|
|
1
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
%Delimiter = ( |
26
|
|
|
|
|
|
|
'left' => '[ ', |
27
|
|
|
|
|
|
|
'right' => ' ]' |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
%Names = ( |
31
|
|
|
|
|
|
|
'Edward' => 'A', 'Michael' => 'B', 'Doug' => 'C', 'Bill' => 'D', |
32
|
|
|
|
|
|
|
'Matt' => 'E', 'Kyle' => 'F', 'Dawn' => 'G', 'Kurt' => 'H', |
33
|
|
|
|
|
|
|
'Courtney' => 'I', 'Amanda' => 'J', 'Taylor' => 'K', 'Shelby' => 'L', |
34
|
|
|
|
|
|
|
'Carol' => 'M', 'Kathy' => 'N', 'Keith' => 'O', 'Carrie' => 'P', |
35
|
|
|
|
|
|
|
'Corey' => 'Q', 'Kelly' => 'R', 'Erik' => 'S', 'John' => 'T', |
36
|
|
|
|
|
|
|
'Nick' => 'U', 'Eva' => 'V', 'Karen' => 'W', 'Barb' => 'X', |
37
|
|
|
|
|
|
|
'Ivan' => 'Y', 'Michelle' => 'Z', 'Shelly' => 'a', 'Guyla' => 'b', |
38
|
|
|
|
|
|
|
'Gary' => 'c', 'Dan' => 'd', 'Bianca' => 'e', 'Hamlet' => 'f', |
39
|
|
|
|
|
|
|
'Othello' => 'g', 'Iago' => 'h', 'Brabantio' => 'i', 'Berenice' => 'j', |
40
|
|
|
|
|
|
|
'Beatrice' => 'k', 'Emilia' => 'l', 'Amy' => 'm', 'Angela' => 'n', |
41
|
|
|
|
|
|
|
'Sheri' => 'o', 'Ginger' => 'p', 'Chloe' => 'q', 'Amber' => 'r', |
42
|
|
|
|
|
|
|
'Kristi' => 's', 'Jasmine' => 't', 'Pierre' => 'u', 'Francois' => 'v', |
43
|
|
|
|
|
|
|
'Louis' => 'w', 'Pietro' => 'x', 'Reed' => 'y', 'Peter' => 'z', |
44
|
|
|
|
|
|
|
'Ned' => '`', 'Homer' => '1', 'Bart' => '2', 'Lisa' => '3', |
45
|
|
|
|
|
|
|
'Marge' => '4', 'Margaret' => '5', 'Mo' => '6', 'Barney' => '7', |
46
|
|
|
|
|
|
|
'Sherlock' => '8', 'Pennywise' => '9', 'Harry' => '0', 'Stephen' => '-', |
47
|
|
|
|
|
|
|
'Lenore' => '=', 'Edgar' => '~', 'Howard' => '!', 'Phillip' => '@', |
48
|
|
|
|
|
|
|
'Hrothgar' => '#', 'Gunther' => '$', 'Beowulf' => '%', 'Unferth' => '^', |
49
|
|
|
|
|
|
|
'Arthur' => '&', 'Lancelot' => '*', 'Percival' => '(', 'Bors' => ')', |
50
|
|
|
|
|
|
|
'Elaine' => '_', 'Igraine' => '+', 'Uther' => ';', 'Merlin' => ':', |
51
|
|
|
|
|
|
|
'Leo' => '"', 'Brett' => "'", 'Shane' => '[', 'George' => '{', |
52
|
|
|
|
|
|
|
'Alfred' => ']', 'Alex' => '}', 'Ron' => '\\','Henry' => '|', |
53
|
|
|
|
|
|
|
'Mitchell' => ',', 'Spenser' => '<', 'Ray' => '.', 'Donald' => '>', |
54
|
|
|
|
|
|
|
'Robin' => '/', 'Robert' => '?', 'Kevin' => ' ', 'Terry' => ' ', |
55
|
|
|
|
|
|
|
'Franklin' => ' ', 'Rodney' => ' ', 'Willow' => ' ', 'Buffy' => ' ', |
56
|
|
|
|
|
|
|
'Brenda' => ' ', 'Mark' => ' ', 'Luke' => ' ', 'Elizabeth' => ' ', |
57
|
|
|
|
|
|
|
'Tucker' => ' ', 'Hal' => ' ', 'Monica' => 'a', 'Allen' => 'a', |
58
|
|
|
|
|
|
|
'Cliff' => 'a', 'Nina' => 'a', 'Palmer' => 'a', 'Joseph' => 'a', |
59
|
|
|
|
|
|
|
'Leslie' => 'a', 'Randall' => 'a', 'Kent' => 'a', 'Gronk' => 'a', |
60
|
|
|
|
|
|
|
'Remick' => 'e', 'Ronald' => 'e', 'Dougal' => 'e', 'Angus' => 'e', |
61
|
|
|
|
|
|
|
'Flip' => 'e', 'Jay' => 'e', 'Reese' => 'e', 'Dwight' => 'e', |
62
|
|
|
|
|
|
|
'Rocky' => 'e', 'Bjorn' => 'e', 'Helga' => 'n', 'Loki' => 'n', |
63
|
|
|
|
|
|
|
'Brunhilda' => 'n', 'Hansel' => 'n', 'Gretel' => 'n', 'Grendel' => 'n', |
64
|
|
|
|
|
|
|
'Bertilak' => 'n', 'Bernie' => 'n', 'Basil' => 'n', 'Erol' => 'n', |
65
|
|
|
|
|
|
|
'Malcom' => 'o', 'Marie' => 'o', 'Jane' => 'o', 'Clark' => 'o', |
66
|
|
|
|
|
|
|
'Buster' => 'o', 'Franco' => 'o', 'Earl' => 'o', 'Laertes' => 'o', |
67
|
|
|
|
|
|
|
'Odysseus' => 'o', 'Telemachus' => 'o', 'Zeus' => 'r', 'Heracles' => 'r', |
68
|
|
|
|
|
|
|
'Ophelia' => 'r', 'Hera' => 'r', 'Aphrodite' => 'r', 'Venus' => 'r', |
69
|
|
|
|
|
|
|
'Ares' => 'r', 'Apollo' => 'r', 'Amphitryon' => 'r', 'Agamemnon' => 'r', |
70
|
|
|
|
|
|
|
'Menelaus' => 's', 'Paulo' => 's', 'Ivano' => 's', 'Junior' => 's', |
71
|
|
|
|
|
|
|
'Jughead' => 's', 'Jared' => 's', 'Jimmy' => 's', 'Perry' => 's', |
72
|
|
|
|
|
|
|
'Taliesin' => 's', 'Devon' => 's', 'Red' => 't', 'Bonzo' => 't', |
73
|
|
|
|
|
|
|
'Sparky' => 't', 'Tex' => 't', 'Surachai' => 't', 'Samaransak' => 't', |
74
|
|
|
|
|
|
|
'Nai' => 't', 'Jackie' => 't', 'Bruce' => 't', 'Lennox' => 't' |
75
|
|
|
|
|
|
|
); |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
@nSpace = ( 'Kevin', 'Terry', 'Franklin', 'Rodney', 'Willow', 'Buffy', 'Brenda', 'Mark', 'Luke', 'Elizabeth', 'Tucker', 'Hal' ); |
78
|
|
|
|
|
|
|
@nA = ( 'Monica', 'Allen', 'Cliff', 'Nina', 'Palmer', 'Joseph', 'Leslie', 'Randall', 'Kent', 'Gronk' ); |
79
|
|
|
|
|
|
|
@nE = ( 'Remick', 'Ronald', 'Dougal', 'Angus', 'Flip', 'Jay', 'Reese', 'Dwight', 'Rocky', 'Bjorn' ); |
80
|
|
|
|
|
|
|
@nN = ( 'Helga', 'Loki', 'Brunhilda', 'Hansel', 'Gretel', 'Grendel', 'Bertilak', 'Bernie', 'Basil', 'Erol' ); |
81
|
|
|
|
|
|
|
@nO = ( 'Malcom', 'Marie', 'Jane', 'Clark', 'Buster', 'Franco', 'Earl', 'Laertes', 'Odysseus', 'Telemachus' ); |
82
|
|
|
|
|
|
|
@nR = ( 'Zeus', 'Heracles', 'Ophelia', 'Hera', 'Aphrodite', 'Venus', 'Ares', 'Apollo', 'Amphitryon', 'Agamemnon' ); |
83
|
|
|
|
|
|
|
@nS = ( 'Menelaus', 'Paulo', 'Ivano', 'Junior', 'Jughead', 'Jared', 'Jimmy', 'Perry', 'Taliesin', 'Devon' ); |
84
|
|
|
|
|
|
|
@nT = ( 'Red', 'Bonzo', 'Sparky', 'Tex', 'Surachai', 'Samaransak', 'Nai', 'Jackie', 'Bruce', 'Lennox' ); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
%Phrases = ( |
87
|
|
|
|
|
|
|
'That was funny!' => 'A', 'How long have you been here?' => 'B', |
88
|
|
|
|
|
|
|
'How long have you been waiting?' => 'C', 'When did you say you had your appointment?' => 'D', |
89
|
|
|
|
|
|
|
'That is a lovely shade of blue.' => 'E', 'That weighs a bit more than I expected.' => 'F', |
90
|
|
|
|
|
|
|
'Where did you say you want me to put that?' => 'G', "I won't put that there." => 'H', |
91
|
|
|
|
|
|
|
"Are you sure I'm supposed to put that there?" => 'I', 'I need to sharpen my sword.' => 'J', |
92
|
|
|
|
|
|
|
'I like to paint.' => 'K', 'Wow, you have a lot of books.' => 'L', |
93
|
|
|
|
|
|
|
'I finally got my network setup.' => 'M', 'I need more RAM.' => 'N', |
94
|
|
|
|
|
|
|
'Where did I put my pen?' => 'O', 'That looks like a nasty cut.' => 'P', |
95
|
|
|
|
|
|
|
'Have you got some aspirin?' => 'Q', 'Got any gum?' => 'R', |
96
|
|
|
|
|
|
|
'My subscription to Sys Admin is about to expire.' => 'S', "She's pretty" => 'T', |
97
|
|
|
|
|
|
|
'I wish it would stop raining.' => 'U', 'It is waaaaay too hot in here.' => 'V', |
98
|
|
|
|
|
|
|
'Could you turn that fan off?' => 'W', 'Do you know much about TCP/IP?' => 'X', |
99
|
|
|
|
|
|
|
'I finally got my certificate.' => 'Y', 'That picture frame is a little crooked.' => 'Z', |
100
|
|
|
|
|
|
|
'Did you hear that noise?' => 'a', 'Hey, the Inspector General is coming.' => 'b', |
101
|
|
|
|
|
|
|
'Lucky for me.' => 'c', "You don't say?" => 'd', |
102
|
|
|
|
|
|
|
'Could that possibly smell any worse?' => 'e', 'Probably not.' => 'f', |
103
|
|
|
|
|
|
|
'How long should I cook this?' => 'g', "You'll want to cook that very slowly." => 'h', |
104
|
|
|
|
|
|
|
'Me want beer.' => 'i', 'I could really use a nap.' => 'j', |
105
|
|
|
|
|
|
|
'I have to pick up my daughter after work.' => 'k', 'Do you think anyone will notice?' => 'l', |
106
|
|
|
|
|
|
|
"Not if you expect to go out in public." => 'm', 'Hey, I like this song.' => 'n', |
107
|
|
|
|
|
|
|
'That is too expensive for me.' => 'o', 'Says who?' => 'p', |
108
|
|
|
|
|
|
|
"I don't like it when you touch me there." => 'q', 'I know, but I never liked it.' => 'r', |
109
|
|
|
|
|
|
|
'Hot enough for you?' => 's', 'I had spaghetti for dinner three times last week.' => 't', |
110
|
|
|
|
|
|
|
'I could have sworn I locked the door.' => 'u', 'Have you seen my keys?' => 'v', |
111
|
|
|
|
|
|
|
'I saw it over there.' => 'w', 'Do these pants make my butt look big?' => 'x', |
112
|
|
|
|
|
|
|
'Putting on a little weight, I see.' => 'y', "Say that again and I'll smack you." => 'z', |
113
|
|
|
|
|
|
|
'I am an excellent driver.' => '`', 'You drive too fast.' => '1', |
114
|
|
|
|
|
|
|
'I love pizza.' => '2', 'Not nearly as much as you do.' => '3', |
115
|
|
|
|
|
|
|
'Come over here and sit on my lap.' => '4', 'Not a chance in hell.' => '5', |
116
|
|
|
|
|
|
|
'You know you want to.' => '6', 'Sure I do.' => '7', |
117
|
|
|
|
|
|
|
'You are weak and lack skill.' => '8', 'How about a nice bottle of wine with dinner?' => '9', |
118
|
|
|
|
|
|
|
'I could use a shower.' => '0', 'How many fish did you catch?' => '-', |
119
|
|
|
|
|
|
|
'That is quite a collection you have there.' => '=', 'Please stop hitting me with that pickle.' => '~', |
120
|
|
|
|
|
|
|
'Why would I want to do that?' => '!', 'I asked nicely.' => '@', |
121
|
|
|
|
|
|
|
'Look at all those chickens!' => '#', 'This is taking too long.' => '$', |
122
|
|
|
|
|
|
|
"I've been trying to learn that for ages." => '%', 'How many times?' => '^', |
123
|
|
|
|
|
|
|
'Eight or nine, I think.' => '&', 'Not unless you want me to cry.' => '*', |
124
|
|
|
|
|
|
|
'I hope she likes it.' => '(', 'She will, especially if you throw it at her.' => ')', |
125
|
|
|
|
|
|
|
'He never stops complaining!' => '_', "Sure, just wait until he isn't looking." => '+', |
126
|
|
|
|
|
|
|
'Why does that smell like cheese?' => '[', "I'm not sure I've ever seen anything that ugly." => '{', |
127
|
|
|
|
|
|
|
'How may of those do you have?' => ']', 'Lots more than you do.' => '}', |
128
|
|
|
|
|
|
|
'I would love to.' => '\\','I can think of nothing I would like better.' => '|', |
129
|
|
|
|
|
|
|
'No, it is too soon for that.' => ';', 'She thinks I dance funny.' => ':', |
130
|
|
|
|
|
|
|
'Nice socks. Did you get dressed in the dark?' => "'", 'Why must you say things like that?' => '"', |
131
|
|
|
|
|
|
|
'Because I think it is funny.' => ',', 'Hey, you asked.' => '<', |
132
|
|
|
|
|
|
|
"That's the last time I ask for your opinion." => '.', 'I never did care for that.' => '>', |
133
|
|
|
|
|
|
|
"That's what you think." => '/', 'Wonderful, my nose is bleeding again.' => '?', |
134
|
|
|
|
|
|
|
'Why would I do that?' => ' ', 'I need more paint.' => ' ', |
135
|
|
|
|
|
|
|
'The water is warm.' => ' ', 'Have you ever seen so many worms?' => ' ', |
136
|
|
|
|
|
|
|
'Three, maybe four times. And you?' => ' ', 'My shoe is untied again.' => ' ', |
137
|
|
|
|
|
|
|
'I finally got around to doing that.' => ' ', 'Could you please pass the coleslaw?' => ' ', |
138
|
|
|
|
|
|
|
'Have you ever seen one of these?' => ' ', "I've never seen one so close up before." => ' ', |
139
|
|
|
|
|
|
|
'It looks sort of squashed.' => ' ', 'Whatever you say.' => ' ', |
140
|
|
|
|
|
|
|
'Not if you paid me.' => 'a', "Please don't poke me with that." => 'a', |
141
|
|
|
|
|
|
|
'Have you looked under the table?' => 'a', 'It has water in it.' => 'a', |
142
|
|
|
|
|
|
|
'Hey, nice foot.' => 'a', "I'm not sure I should put that there." => 'a', |
143
|
|
|
|
|
|
|
'I beg your pardon?' => 'a', 'Not at the moment.' => 'a', |
144
|
|
|
|
|
|
|
"I don't think so." => 'a', 'Who?' => 'a', |
145
|
|
|
|
|
|
|
'I never did learn how to do that very well.' => 'e', 'It is much heavier than it looks.' => 'e', |
146
|
|
|
|
|
|
|
'No, you have too many already.' => 'e', 'Done!', => 'e', |
147
|
|
|
|
|
|
|
'I win, you lose.' => 'e', 'Get bent.' => 'e', |
148
|
|
|
|
|
|
|
'When would be a good time for you?' => 'e', 'Pfah!' => 'e', |
149
|
|
|
|
|
|
|
'In your shoe, I think.' => 'e', 'I did that yesterday.' => 'e', |
150
|
|
|
|
|
|
|
'Ok, but it will cost you.' => 'n', 'I like it when you touch me there.' => 'n', |
151
|
|
|
|
|
|
|
'Have I ever told you that you look like Ted Koppel?' => 'n', "Shhhh. I'm trying to listen to this." => 'n', |
152
|
|
|
|
|
|
|
'Will you never stop crying?' => 'n', 'Because I said so.' => 'n', |
153
|
|
|
|
|
|
|
'As soon as the train stops.' => 'n', 'That is a very large apple.' => 'n', |
154
|
|
|
|
|
|
|
"I'm not sure what that is." => 'n', 'No thanks.' => 'n', |
155
|
|
|
|
|
|
|
'Could you repeat that?' => 'o', 'I have never been so bored.' => 'o', |
156
|
|
|
|
|
|
|
'So what are your thoughts on Tolstoy?' => 'o', "I'm still trying to find the plot." => 'o', |
157
|
|
|
|
|
|
|
"He's rather fond of himself, isn't he?" => 'o', "Well it looks like...I don't know what it looks like." => 'o', |
158
|
|
|
|
|
|
|
'Your point being?' => 'o', 'And...?' => 'o', |
159
|
|
|
|
|
|
|
'I have a picture of that on my mousepad.' => 'o', 'That stain will never come out.' => 'o', |
160
|
|
|
|
|
|
|
'I tried that once, but it felt really weird.' => 'r', 'That door sure is hard to open.' => 'r', |
161
|
|
|
|
|
|
|
'That really hurt.' => 'r', 'I have to delete that.' => 'r', |
162
|
|
|
|
|
|
|
'It is just too big.' => 'r', 'Only when I cross my eyes.' => 'r', |
163
|
|
|
|
|
|
|
'Do you really think so?' => 'r', 'I took an educated guess.' => 'r', |
164
|
|
|
|
|
|
|
'Your theory is fundamentally flawed.' => 'r', "You probably shouldn't put your finger there." => 'r', |
165
|
|
|
|
|
|
|
'I think you broke it.' => 's', 'It just needs new batteries.' => 's', |
166
|
|
|
|
|
|
|
'How long have you known?' => 's', "You think I'm dumb, don't you?" => 's', |
167
|
|
|
|
|
|
|
"I've never been so insulted." => 's', 'Sure is windy out there.' => 's', |
168
|
|
|
|
|
|
|
'I wish I could fly.' => 's', 'At night the ice weasles come.' => 's', |
169
|
|
|
|
|
|
|
'The penguins are tearing at my flesh.' => 's', 'Do you smell smoke?' => 's', |
170
|
|
|
|
|
|
|
'You should try it sometime.' => 't', "I don't think I'd like that." => 't', |
171
|
|
|
|
|
|
|
'Kiss me.' => 't', 'Do you need a tissue?' => 't', |
172
|
|
|
|
|
|
|
'Good question.' => 't', 'What an ugly cat!' => 't', |
173
|
|
|
|
|
|
|
'Want to hear a joke?' => 't', 'Not if you are the one doing it.' => 't', |
174
|
|
|
|
|
|
|
'It sure is a long way down.' => 't', 'How long did it take to make that?' => 't' |
175
|
|
|
|
|
|
|
); |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
@pSpace = ( |
178
|
|
|
|
|
|
|
'Why would I do that?', 'I need more paint.', 'The water is warm.', |
179
|
|
|
|
|
|
|
'Have you ever seen so many worms?', 'Three, maybe four times. And you?', 'My shoe is untied again.', |
180
|
|
|
|
|
|
|
'I finally got around to doing that.', 'Could you please pass the coleslaw?', 'Have you ever seen one of these?', |
181
|
|
|
|
|
|
|
"I've never seen one so close up before.", 'It looks sort of squashed.', 'Whatever you say.' |
182
|
|
|
|
|
|
|
); |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
@pA = ( |
185
|
|
|
|
|
|
|
'Not if you paid me.', "Please don't poke me with that.", |
186
|
|
|
|
|
|
|
'Have you looked under the table?', 'It has water in it.', |
187
|
|
|
|
|
|
|
'Hey, nice foot.', "I'm not sure I should put that there.", |
188
|
|
|
|
|
|
|
'I beg your pardon?', 'Not at the moment.', |
189
|
|
|
|
|
|
|
"I don't think so.", 'Who?' |
190
|
|
|
|
|
|
|
); |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
@pE = ( |
193
|
|
|
|
|
|
|
"I never did learn how to do that very well.", "It is much heavier than it looks.", |
194
|
|
|
|
|
|
|
"No, you have too many already.", "Done!", |
195
|
|
|
|
|
|
|
"I win, you lose.", "Get bent.", |
196
|
|
|
|
|
|
|
"When would be a good time for you?", "Pfah!", |
197
|
|
|
|
|
|
|
"In your shoe, I think.", "I did that yesterday." |
198
|
|
|
|
|
|
|
); |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
@pN = ( |
201
|
|
|
|
|
|
|
'Ok, but it will cost you.', 'I like it when you touch me there.', |
202
|
|
|
|
|
|
|
'Have I ever told you that you look like Ted Koppel?', "Shhhh. I'm trying to listen to this.", |
203
|
|
|
|
|
|
|
'Will you never stop crying?', 'Because I said so.', |
204
|
|
|
|
|
|
|
'As soon as the train stops.', 'That is a very large apple.', |
205
|
|
|
|
|
|
|
"I'm not sure what that is.", 'No thanks.' |
206
|
|
|
|
|
|
|
); |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
@pO = ( |
209
|
|
|
|
|
|
|
'Could you repeat that?', 'I have never been so bored.', |
210
|
|
|
|
|
|
|
'So what are your thoughts on Tolstoy?', "I'm still trying to find the plot.", |
211
|
|
|
|
|
|
|
"He's rather fond of himself, isn't he?", "Well it looks like...I don't know what it looks like.", |
212
|
|
|
|
|
|
|
"Your point being?", 'And...?', |
213
|
|
|
|
|
|
|
'I have a picture of that on my mousepad.', 'That stain will never come out.' |
214
|
|
|
|
|
|
|
); |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
@pR = ( |
217
|
|
|
|
|
|
|
'I tried it once, but it felt really weird.', 'That door sure is hard to open.', |
218
|
|
|
|
|
|
|
'That really hurt.', 'I have to delete that.', |
219
|
|
|
|
|
|
|
'It is just too big.', 'Only when I cross my eyes.', |
220
|
|
|
|
|
|
|
'Do you really think so?', 'I took an educated guess.', |
221
|
|
|
|
|
|
|
'Your theory is fundamentally flawed.', "You probably shouldn't put your finger there." |
222
|
|
|
|
|
|
|
); |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
@pS = ( |
225
|
|
|
|
|
|
|
'I think you broke it.', 'It just needs new batteries.', |
226
|
|
|
|
|
|
|
'How long have you known?', 'I wish I could fly.', |
227
|
|
|
|
|
|
|
'At night the ice weasles come.', 'The penguins are tearing at my flesh.', |
228
|
|
|
|
|
|
|
"You think I'm dumb, don't you?", "I've never been so insulted.", |
229
|
|
|
|
|
|
|
'Sure is windy out there.', 'Do you smell smoke?' |
230
|
|
|
|
|
|
|
); |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
@pT = ( |
233
|
|
|
|
|
|
|
'You should try it sometime.', "I don't think I'd like that.", |
234
|
|
|
|
|
|
|
'Kiss me.', 'Do you need a tissue?', |
235
|
|
|
|
|
|
|
'Good question.', 'What an ugly cat!', |
236
|
|
|
|
|
|
|
'Want to hear a joke?', 'Not if you are the one doing it.', |
237
|
|
|
|
|
|
|
'It sure is a long way down.', 'How long did it take to make that?' |
238
|
|
|
|
|
|
|
); |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
while ( ( $name, $val ) = each %Names ) { |
241
|
|
|
|
|
|
|
$rNames{ $val } = $name; |
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
while ( ( $name, $val ) = each %Phrases ) { |
245
|
|
|
|
|
|
|
$rPhrases{ $val } = $name; |
246
|
|
|
|
|
|
|
} |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
@Names = keys %Names; |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
@Actions = ( |
251
|
|
|
|
|
|
|
'writes a poem', 'enters from stage left', |
252
|
|
|
|
|
|
|
"peers over Michael's shoulder", 'laughs', |
253
|
|
|
|
|
|
|
'screams in pain', 'opens a book', |
254
|
|
|
|
|
|
|
'sits at the table', 'crosses stage right', |
255
|
|
|
|
|
|
|
'looks under the chair', 'straightens the table cloth', |
256
|
|
|
|
|
|
|
'opens the window', 'looks around in confusion', |
257
|
|
|
|
|
|
|
'starts singing quietly', 'closes the window', |
258
|
|
|
|
|
|
|
'cries', 'enters from stage right', |
259
|
|
|
|
|
|
|
'crosses stage left', 'picks up the book', |
260
|
|
|
|
|
|
|
'breaks the mirror', 'kicks the table', |
261
|
|
|
|
|
|
|
'gazes longingly at Pietro', 'dances a merry jig', |
262
|
|
|
|
|
|
|
'thinks happy thoughts', 'falls to the floor', |
263
|
|
|
|
|
|
|
'tries to think of something funny to say', 'yearns for the good old days', |
264
|
|
|
|
|
|
|
'turns on the radio', 'turns off the radio', |
265
|
|
|
|
|
|
|
'turns on the television', 'turns off the television', |
266
|
|
|
|
|
|
|
'selects a book from the bookshelf', 'concentrates', |
267
|
|
|
|
|
|
|
'burps', 'clucks like a chicken', |
268
|
|
|
|
|
|
|
'motions toward the door', 'plops down on the sofa', |
269
|
|
|
|
|
|
|
'looks around suspiciously', 'beings folding laundry', |
270
|
|
|
|
|
|
|
'takes a pan of brownies from the oven', 'thinks of the color blue', |
271
|
|
|
|
|
|
|
"pours vinegar in Karen's shoes", 'eats a pickle', |
272
|
|
|
|
|
|
|
'disrobes', 'dances about like a loon', |
273
|
|
|
|
|
|
|
'flits about like a fawn in springtime', 'does an impression of Charlie Chaplin', |
274
|
|
|
|
|
|
|
'takes a ham from the oven', 'begins plucking a chicken', |
275
|
|
|
|
|
|
|
'tries to hide under the rug', 'removes the cushions from the sofa', |
276
|
|
|
|
|
|
|
'opens the pantry', 'climbs in the pantry', |
277
|
|
|
|
|
|
|
'crawls under the sink', 'closes the pantry', |
278
|
|
|
|
|
|
|
'fixes a turkey sandwich', 'starts making pancakes' |
279
|
|
|
|
|
|
|
); |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
sub new { |
282
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
283
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
284
|
0
|
|
|
|
|
|
return $self; |
285
|
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
sub RandomElement { |
288
|
0
|
0
|
|
0
|
0
|
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
289
|
0
|
|
|
|
|
|
my $arrayref = shift; |
290
|
0
|
|
|
|
|
|
$arrayref->[ rand @{ $arrayref } ]; |
|
0
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
} |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
sub StageDirections { |
294
|
0
|
0
|
|
0
|
0
|
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
295
|
0
|
|
|
|
|
|
return $Delimiter{ 'left' } . RandomElement( \@Names ) . " " . RandomElement( \@Actions ) . $Delimiter{ 'right' } . "\n"; |
296
|
|
|
|
|
|
|
} |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
sub Make { |
299
|
0
|
0
|
|
0
|
0
|
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
300
|
0
|
|
|
|
|
|
my $string = shift; |
301
|
0
|
|
|
|
|
|
my @chars = split ( //, $string ); |
302
|
0
|
|
|
|
|
|
my ( $out, $i, $temp ); |
303
|
0
|
|
|
|
|
|
for ( $i = 0 ; $i <= $#chars ; $i += 2 ) { |
304
|
0
|
0
|
|
|
|
|
if ( $chars[ $i ] eq "\n" ) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
305
|
0
|
|
|
|
|
|
$out .= StageDirections(); |
306
|
0
|
|
|
|
|
|
$i--; |
307
|
0
|
|
|
|
|
|
next; |
308
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq " " ) { |
309
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nSpace ) . ":"; |
310
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq "a" ) { |
311
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nA ) . ":"; |
312
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq "e" ) { |
313
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nE ) . ":"; |
314
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq "n" ) { |
315
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nN ) . ":"; |
316
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq "o" ) { |
317
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nO ) . ":"; |
318
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq "r" ) { |
319
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nR ) . ":"; |
320
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq "s" ) { |
321
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nS ) . ":"; |
322
|
|
|
|
|
|
|
} elsif ( $chars[ $i ] eq "t" ) { |
323
|
0
|
|
|
|
|
|
$temp = RandomElement( \@nT ) . ":"; |
324
|
|
|
|
|
|
|
} else { |
325
|
0
|
|
|
|
|
|
$temp = "$rNames{ $chars[ $i ] }:"; |
326
|
|
|
|
|
|
|
} |
327
|
0
|
0
|
0
|
|
|
|
if ( ( $i + 1 ) > $#chars || $chars[ $i + 1 ] eq "\n" ) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
328
|
0
|
|
|
|
|
|
$out .= $temp . " " . RandomElement( \@pSpace ) . "\n" . StageDirections(); |
329
|
0
|
|
|
|
|
|
next; |
330
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq " " ) { |
331
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pSpace ); |
332
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq "a" ) { |
333
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pA ); |
334
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq "e" ) { |
335
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pE ); |
336
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq "n" ) { |
337
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pN ); |
338
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq "o" ) { |
339
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pO ); |
340
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq "r" ) { |
341
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pR ); |
342
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq "s" ) { |
343
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pS ); |
344
|
|
|
|
|
|
|
} elsif ( $chars[ $i + 1 ] eq "t" ) { |
345
|
0
|
|
|
|
|
|
$temp .= " " . RandomElement( \@pT ); |
346
|
|
|
|
|
|
|
} else { |
347
|
0
|
|
|
|
|
|
$temp .= " " . $rPhrases{ $chars[ $i + 1 ] }; |
348
|
|
|
|
|
|
|
} |
349
|
0
|
|
|
|
|
|
$out .= $temp . "\n"; |
350
|
|
|
|
|
|
|
} |
351
|
0
|
|
|
|
|
|
return $out; |
352
|
|
|
|
|
|
|
} |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
sub UnMake { |
355
|
0
|
0
|
|
0
|
0
|
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
356
|
0
|
|
|
|
|
|
my $string = shift; |
357
|
0
|
|
|
|
|
|
my $out = ""; |
358
|
0
|
|
|
|
|
|
my @lines = split ( /\n/, $string ); |
359
|
0
|
|
|
|
|
|
foreach my $line ( @lines ) { |
360
|
0
|
|
|
|
|
|
( $name, $val ) = split ( /: /, $line ); |
361
|
0
|
0
|
0
|
|
|
|
if ( $name =~ /^\[/ && ! $val ) { |
362
|
0
|
|
|
|
|
|
$out .= "\n"; |
363
|
0
|
|
|
|
|
|
next; |
364
|
|
|
|
|
|
|
} |
365
|
0
|
0
|
|
|
|
|
if ( defined $Names{ $name } ) { |
366
|
0
|
|
|
|
|
|
$out .= $Names{ $name }; |
367
|
|
|
|
|
|
|
} |
368
|
0
|
0
|
|
|
|
|
if ( defined $Phrases{ $val } ) { |
369
|
0
|
|
|
|
|
|
$out .= $Phrases{ $val }; |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
} |
372
|
0
|
|
|
|
|
|
return $out; |
373
|
|
|
|
|
|
|
} |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
1; |
376
|
|
|
|
|
|
|
__END__ |