line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of Language::Befunge. |
3
|
|
|
|
|
|
|
# Copyright (c) 2001-2009 Jerome Quelin, all rights reserved. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
6
|
|
|
|
|
|
|
# it under the same terms as Perl itself. |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Language::Befunge::Wrapping; |
11
|
|
|
|
|
|
|
|
12
|
73
|
|
|
73
|
|
34780
|
use strict; |
|
73
|
|
|
|
|
161
|
|
|
73
|
|
|
|
|
2692
|
|
13
|
73
|
|
|
73
|
|
385
|
use warnings; |
|
73
|
|
|
|
|
134
|
|
|
73
|
|
|
|
|
2600
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# -- CONSTRUCTOR |
16
|
|
|
|
|
|
|
|
17
|
73
|
|
|
73
|
|
1366
|
use Class::XSAccessor constructor => 'new'; |
|
73
|
|
|
|
|
3319
|
|
|
73
|
|
|
|
|
702
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# -- PUBLIC METHODS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
# $wrapping->wrap( $storage, $ip ); |
24
|
|
|
|
|
|
|
# |
25
|
|
|
|
|
|
|
# Wrap $ip in $storage according to this module wrapping algorithm. Note |
26
|
|
|
|
|
|
|
# that $ip is already out of bounds, ie, it has been moved once by LBI. |
27
|
|
|
|
|
|
|
# As a side effect, $ip will have its position changed. |
28
|
|
|
|
|
|
|
# |
29
|
|
|
|
|
|
|
# LBW implements a wrapping that dies. It's meant to be overridden by |
30
|
|
|
|
|
|
|
# other wrapping classes. |
31
|
|
|
|
|
|
|
# |
32
|
1
|
|
|
1
|
1
|
2812
|
sub wrap { die 'wrapping not implemented in LBW'; } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
__END__ |