line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Travigator; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
35065
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
114
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our (@ISA, @EXPORT_OK, %EXPORT_TAGS); |
7
|
|
|
|
|
|
|
BEGIN { |
8
|
1
|
|
|
1
|
|
5
|
require Exporter; |
9
|
1
|
|
|
|
|
24
|
@ISA = qw(Exporter); |
10
|
1
|
|
|
|
|
3
|
@EXPORT_OK = qw(travigate); |
11
|
1
|
|
|
|
|
122
|
%EXPORT_TAGS = ( all => [qw(travigate)] ); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub travigate { |
15
|
1
|
|
|
1
|
1
|
14
|
my @directions = ( |
16
|
|
|
|
|
|
|
"I am not sure where you want to go\n", |
17
|
|
|
|
|
|
|
"These are not the droids you are looking for\n", |
18
|
|
|
|
|
|
|
"What can you make of this?\n", |
19
|
|
|
|
|
|
|
"Is it 4 yet?\n", |
20
|
|
|
|
|
|
|
"Left turn?\n", |
21
|
|
|
|
|
|
|
"Would you like fries with that?\n", |
22
|
|
|
|
|
|
|
); |
23
|
1
|
|
|
|
|
57
|
my $index = int(rand(@directions)); |
24
|
1
|
|
|
|
|
5
|
return $directions[$index]; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# ABSTRACT: who needs google when you have the travigator |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |