updating copyright
[language-befunge.git] / lib / Language / Befunge / lib / HELO.pm
blobc622196d435b74ec8580495282accdf915cbc182
2 # This file is part of Language::Befunge.
3 # Copyright (c) 2001-2009 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::lib::HELO;
12 use strict;
13 use warnings;
15 sub new { return bless {}, shift; }
17 sub P {
18 print "Hello world!\n";
21 sub S {
22 my (undef, $interp) = @_;
23 $interp->get_curip->spush( reverse map { ord } split //, "Hello world!\n".chr(0) );
28 __END__
31 =head1 NAME
33 Language::Befunge::IP::lib::HELO - a Befunge extension to print Hello world!
36 =head1 SYNOPSIS
38 P - print "Hello world!\n"
39 S - store the gnirts "Hello world!\n"0 on the TOSS
41 =head1 DESCRIPTION
43 This extension is just an example of the Befunge extension mechanism
44 of the Language::Befunge interpreter.
47 =head1 FUNCTIONS
49 =head2 new
51 Create a new HELO instance.
54 =head2 P
56 Output C<Hello world!\n>.
59 =head2 S
61 Store the gnirts "Hello world!\n"0 on the TOSS.
64 =head1 SEE ALSO
66 L<Language::Befunge>.
69 =head1 AUTHOR
71 Jerome Quelin, E<lt>jquelin@cpan.orgE<gt>
74 =head1 COPYRIGHT & LICENSE
76 Copyright (c) 2001-2009 Jerome Quelin, all rights reserved.
78 This program is free software; you can redistribute it and/or modify
79 it under the same terms as Perl itself.
82 =cut