new extension ORTH
[language-befunge.git] / lib / Language / Befunge / Wrapping.pm
blobc28e35c24adfe9d1700e448fd72d2a708708c003
2 # This file is part of Language::Befunge.
3 # Copyright (c) 2001-2008 Jerome Quelin, all rights reserved.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the same terms as Perl itself.
10 package Language::Befunge::Wrapping;
12 use strict;
13 use warnings;
15 use base qw{ Class::Accessor::Fast };
17 # -- CONSTRUCTOR
20 # provided by Class::Accessor::Fast
24 # -- PUBLIC METHODS
27 # $wrapping->wrap( $storage, $ip );
29 # Wrap $ip in $storage according to this module wrapping algorithm. Note
30 # that $ip is already out of bounds, ie, it has been moved once by LBI.
31 # As a side effect, $ip will have its position changed.
33 # LBW implements a wrapping that dies. It's meant to be overridden by
34 # other wrapping classes.
36 sub wrap { die 'wrapping not implemented in LBW'; }
39 __END__
42 =head1 NAME
44 Language::Befunge::Wrapping - base wrapping class
47 =head1 DESCRIPTION
49 C<LBW> implements a wrapping that dies. It's meant to be overridden by
50 other wrapping classes.
54 =head1 CONSTRUCTOR
56 =head2 LBW->new;
58 Creates a new wrapping object.
61 =head1 PUBLIC METHODS
63 =head2 $wrapping->wrap( $storage, $ip )
65 Wrap C<$ip> in C<$storage> according to this module wrapping algorithm.
66 See L<DESCRIPTION> for an overview of the algorithm used.
68 Note that C<$ip> is already out of bounds, ie, it has been moved once by
69 LBI.
71 As a side effect, $ip will have its position changed.
75 =head1 SEE ALSO
77 L<Language::Befunge>.
80 =head1 AUTHOR
82 Jerome Quelin, C<< <jquelin@cpan.org> >>
85 =head1 COPYRIGHT & LICENSE
87 Copyright (c) 2001-2008 Jerome Quelin, all rights reserved.
89 This program is free software; you can redistribute it and/or modify
90 it under the same terms as Perl itself.
93 =cut