This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use Curses; | |
my %player = ( | |
'health' => 100, | |
'x' => 5, | |
'y' => 5, | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use Curses; | |
my $status = new Curses; | |
my %player = ( | |
'health' => 100, | |
'x' => 5, | |
'y' => 5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
package Player; | |
use strict; | |
use Curses; | |
use Moose; | |
has 'health' => (is => 'rw', isa => 'Int', default => 100); | |
has 'x' => (is => 'rw', isa => 'Int', default => 5); | |
has 'y' => (is => 'rw', isa => 'Int', default => 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
package Player; | |
use strict; | |
use Curses; | |
use Moose; | |
has 'health' => (is => 'rw', isa => 'Int', default => 100); | |
has 'x' => (is => 'rw', isa => 'Int', default => 5); | |
has 'y' => (is => 'rw', isa => 'Int', default => 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @map = ( | |
['#','#','#','#','#'], | |
['#','.','.','.','#']. | |
['#','.','.','.','#']. | |
['#','.','.','.','#']. | |
['#','.','.','.','#']. | |
['#','#','#','#','#']); | |
for(my $y, $y < 5; $y++;) { | |
for(my $x, $x < 4; $x++;) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub countItems { | |
(my $target) = @_; | |
open(TODO, "./.ptd") or die "please create a .ptd file"; | |
@_ = (); | |
for $_ (<TODO>) { push @_, $1 if /^$target:(.*)$/; } | |
return @_; | |
} | |
sub printTodo { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
sub error { | |
my ($error) = @_; | |
print $error; | |
print "ptd - a todo list utility.\n"; | |
print "usage:\n"; | |
print " ptd <action> [options]\n"; | |
print "actions:\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use v5.10; | |
use IO::File; | |
use autodie; | |
package Entry; | |
sub new { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[djanatyn@barda ~]$ cat ~/.cpanm/build.log | |
cpanm (App::cpanminus) 1.4008 on perl 5.012004 built for i386-linux-thread-multi | |
Work directory is /home/djanatyn/.cpanm/work/1312584901.1227 | |
You have make /usr/bin/make | |
You have /usr/bin/wget | |
You have /bin/tar: tar (GNU tar) 1.25 | |
Copyright (C) 2010 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use warnings; | |
use SDL; | |
use SDLx::App; | |
use SDL::Event; | |
use SDL::Events; |
OlderNewer