Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 69038f0
Showing
56 changed files
with
5,642 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,21 @@ | |||
Acme-Perl-VM-* | |||
.* | |||
!.gitignore | |||
!.shipit | |||
*.o | |||
*.obj | |||
*.bs | |||
*.def | |||
Makefile* | |||
!Makefile.PL | |||
*blib | |||
META.yml | |||
inc/ | |||
MANIFEST | |||
*.out | |||
*.bak | |||
nytprof* | |||
cover_db* | |||
*.gcda | |||
*.gno | |||
*.gcov |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
# auto-generated shipit config file. | |||
steps = FindVersion, ChangeAllVersions, CheckVersionsMatch, CheckChangeLog, DistTest, Commit, Tag, MakeDist | |||
|
|||
git.tagpattern = %v | |||
git.push_to = origin | |||
|
|||
CheckChangeLog.files = Changes |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
Revision history for Perl extension Acme::Perl::VM | |||
|
|||
0.0.5 Tue May 26 23:28:48 2009 | |||
- mention Devel::Optrace | |||
- add pp_andassign/pp_orassign | |||
|
|||
0.0.4 Sat May 2 15:34:24 2009 | |||
- fix some bugs | |||
- add ppcodes | |||
|
|||
0.0.3 Sun Apr 26 14:13:42 2009 | |||
- add description to Acme/Perl/VM/JA.pod | |||
- add a number of ppcodes and tests | |||
- improve trace mode | |||
|
|||
0.0.2 Sun Apr 19 12:58:14 2009 | |||
- release for Shibuya.pm#11 | |||
- improve trace mode (APVM_DEBUG=trace) | |||
|
|||
0.0.1_03 Fri Apr 17 23:33:58 2009 | |||
- fix pp_entersub | |||
- add a number of ppcodes and tests | |||
- remove Carp::Always dependency | |||
|
|||
0.0.1_02 Wed Apr 15 18:11:26 2009 | |||
- implement OPpASSIGN_COMMON | |||
|
|||
0.0.1_01 Sat Mar 28 16:40:41 2009 | |||
- original version; created by Module::Setup |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,41 @@ | |||
|
|||
#!start included /usr/local/lib/perl5/5.10.0/ExtUtils/MANIFEST.SKIP | |||
# Avoid version control files. | |||
\bRCS\b | |||
\bCVS\b | |||
\bSCCS\b | |||
,v$ | |||
\B\.svn\b | |||
\b_darcs\b | |||
|
|||
# Avoid Makemaker generated and utility files. | |||
\bMANIFEST\.bak | |||
\bMakefile$ | |||
\bblib/ | |||
\bMakeMaker-\d | |||
\bpm_to_blib\.ts$ | |||
\bpm_to_blib$ | |||
\bblibdirs\.ts$ # 6.18 through 6.25 generated this | |||
|
|||
# Avoid Module::Build generated and utility files. | |||
\bBuild$ | |||
\b_build/ | |||
|
|||
# Avoid temp and backup files. | |||
~$ | |||
\.old$ | |||
\#$ | |||
\b\.# | |||
\.bak$ | |||
|
|||
# Avoid Devel::Cover files. | |||
\bcover_db\b | |||
#!end included /usr/local/lib/perl5/5.10.0/ExtUtils/MANIFEST.SKIP | |||
|
|||
|
|||
# skip dot files | |||
^\. | |||
|
|||
# skip author's files | |||
\bauthor\b | |||
|
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,24 @@ | |||
use strict; | |||
use warnings; | |||
use inc::Module::Install; | |||
|
|||
name 'Acme-Perl-VM'; | |||
all_from 'lib/Acme/Perl/VM.pm'; | |||
|
|||
requires 'Exporter' => 5.57; | |||
requires 'Mouse' => 0.21; | |||
requires 'B'; | |||
|
|||
test_requires 'Test::More' => 0.62; | |||
|
|||
tests 't/*.t'; | |||
author_tests 'xt'; | |||
|
|||
WriteMakefile( | |||
clean => {FILES => q( | |||
Acme-Perl-VM-* *.stackdump | |||
cover_db | |||
nytprof | |||
*.out | |||
)}, | |||
); |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
This is Perl module Acme::Perl::VM. | |||
|
|||
INSTALLATION | |||
|
|||
Acme::Perl::VM installation is straightforward. If your CPAN shell is set up, | |||
you should just be able to do | |||
|
|||
$ cpan Acme::Perl::VM | |||
|
|||
Download it, unpack it, then build it as per the usual: | |||
|
|||
$ perl Makefile.PL | |||
$ make && make test | |||
|
|||
Then install it: | |||
|
|||
$ make install | |||
|
|||
DOCUMENTATION | |||
|
|||
Acme::Perl::VM documentation is available as in POD. So you can do: | |||
|
|||
$ perldoc Acme::Perl::VM | |||
|
|||
to read the documentation online with your favorite pager. | |||
|
|||
Goro Fuji (gfx) |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
#!perl -w | |||
|
|||
use strict; | |||
use B; | |||
use Config; | |||
printf "Perl %vd $Config{archname}\n\n", $^V; | |||
|
|||
foreach my $name(grep{ /^[A-Z]/ } @B::EXPORT_OK ){ | |||
printf "%-30s=%12s\n", $name, B->$name(); | |||
} |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
#!perl -w | |||
|
|||
use strict; | |||
use B; | |||
use Config; | |||
printf "Perl %vd $Config{archname}\n\n", $^V; | |||
|
|||
foreach my $name(sort grep{ !/^[A-Z]/ } @B::EXPORT_OK ){ | |||
printf "%-30s\n", $name; | |||
} |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
#!perl -w | |||
|
|||
use strict; | |||
use B; | |||
use Config; | |||
use Class::Inspector; | |||
|
|||
printf "Perl %vd $Config{archname}\n\n", $^V; | |||
|
|||
my $class = shift(@ARGV) || 'B::SV'; | |||
foreach my $name( sort @{Class::Inspector->methods($class, 'full')} ){ | |||
printf "%s\n", $name; | |||
} |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
#!perl -w | |||
|
|||
use strict; | |||
|
|||
my $sum = 0; | |||
foreach my $i(1 .. 10){ | |||
$sum += $i; | |||
} |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
#!perl -w | |||
|
|||
use strict; | |||
use 5.010; | |||
use Acme::Perl::VM; | |||
|
|||
my $file = `perldoc -l perlrun`; | |||
chomp $file; | |||
open my $in, '<', $file; | |||
|
|||
run_block{ | |||
local $|= 1; | |||
my $i = 0; | |||
while(<$in>){ | |||
print $i++, "\r"; | |||
} | |||
say $i; | |||
}; |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,26 @@ | |||
#!perl -w | |||
|
|||
use strict; | |||
use Devel::Peek; | |||
|
|||
$| = 0; | |||
|
|||
my $mgref = \$|; | |||
my $r; | |||
{ | |||
local $| = 1; | |||
$r = \$|; | |||
Dump($mgref); | |||
Dump($r); | |||
|
|||
|
|||
print "$$mgref\n"; | |||
print "$$r\n"; | |||
} | |||
|
|||
Dump($mgref); | |||
Dump($r); | |||
|
|||
print "$$mgref\n"; | |||
print "$$r\n"; | |||
print "[$|]\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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
#!perl -w | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM; | |||
|
|||
sub f{ | |||
my($x) = @_; | |||
print $x, "\r"; | |||
return $x; | |||
} | |||
|
|||
run_block { | |||
local $| = 1; | |||
|
|||
my $sum = 0; | |||
for(my $i = 1; $i <= 100; $i++){ | |||
for(my $j = 1; $j <= 10; $j++){ | |||
$sum += f($i * $j); | |||
} | |||
} | |||
|
|||
print "\n", $sum, "\n"; | |||
}; | |||
|
|||
print B::timing_info(), "\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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
#!perl -w | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM; | |||
|
|||
sub f{ | |||
my($x) = @_; | |||
print $x, "\r"; | |||
return $x; | |||
} | |||
|
|||
run_block { | |||
local $| = 1; | |||
|
|||
my $sum = 0; | |||
foreach my $i(1 .. 100){ | |||
foreach my $j(1 .. 10){ | |||
$sum += f($i * $j); | |||
} | |||
} | |||
|
|||
print "\n", $sum, "\n"; | |||
}; | |||
|
|||
print B::timing_info(), "\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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
#!perl -w | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM::Run; | |||
|
|||
sub hello{ | |||
my($s) = @_; | |||
|
|||
print "Hello, $s world!\n"; | |||
} | |||
|
|||
hello("APVM"); |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
#!perl -w -Dt | |||
|
|||
my $x = 'APVM'; | |||
print "Hello, $x world!\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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
#!perl -w | |||
use O Concise => '-exec'; | |||
|
|||
my $x = 'APVM'; | |||
print "Hello, $x world!\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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
#!perl -w | |||
BEGIN{ $ENV{APVM_DEBUG} = 'trace' } | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM::Run; | |||
|
|||
my $x = 'APVM'; | |||
print "Hello, $x world!\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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
#!perl -w | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM::Run; | |||
|
|||
my $x = 'APVM'; | |||
print "Hello, $x world!\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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,17 @@ | |||
#!perl -w | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM; | |||
|
|||
sub Foo::hello{ | |||
my(undef, $s) = @_; | |||
|
|||
print "Hello, $s world!\n"; | |||
} | |||
|
|||
run_block { | |||
Foo->hello("Acme::Perl::VM"); | |||
Foo->hello("APVM"); | |||
}; |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
#!perl -w | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM; | |||
|
|||
open *SELF, '<', $0; | |||
run_block{ | |||
while(<SELF>){ | |||
print; | |||
} | |||
}; |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
#!perl -w | |||
BEGIN{ $ENV{APVM_DEBUG} = 'trace' } | |||
use strict; | |||
use FindBin qw($Bin); | |||
use lib "$Bin/../lib"; | |||
|
|||
use Acme::Perl::VM::Run; | |||
|
|||
sub Foo::hello{ | |||
my(undef, $msg) = @_; | |||
|
|||
print "Hello, $msg world!\n"; | |||
} | |||
|
|||
for(my $i = 1; $i <= 1; $i++){ | |||
Foo->hello('APVM'); | |||
} | |||
|
Oops, something went wrong.