Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx committed Nov 17, 2009
0 parents commit 69038f0
Show file tree
Hide file tree
Showing 56 changed files with 5,642 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
@@ -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
7 changes: 7 additions & 0 deletions .shipit
@@ -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
29 changes: 29 additions & 0 deletions Changes
@@ -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
41 changes: 41 additions & 0 deletions MANIFEST.SKIP
@@ -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

24 changes: 24 additions & 0 deletions Makefile.PL
@@ -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
)},
);
27 changes: 27 additions & 0 deletions README
@@ -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)
10 changes: 10 additions & 0 deletions author/b-list-const.pl
@@ -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();
}
10 changes: 10 additions & 0 deletions author/b-list-funcs.pl
@@ -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;
}
13 changes: 13 additions & 0 deletions author/b-list-methods.pl
@@ -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;
}
8 changes: 8 additions & 0 deletions author/foreach.pl
@@ -0,0 +1,8 @@
#!perl -w

use strict;

my $sum = 0;
foreach my $i(1 .. 10){
$sum += $i;
}
18 changes: 18 additions & 0 deletions author/heavy.pl
@@ -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;
};
26 changes: 26 additions & 0 deletions author/mg-local.pl
@@ -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";
27 changes: 27 additions & 0 deletions example/for.pl
@@ -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";
27 changes: 27 additions & 0 deletions example/foreach.pl
@@ -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";
14 changes: 14 additions & 0 deletions example/funcall.pl
@@ -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");
4 changes: 4 additions & 0 deletions example/hello-Dt.pl
@@ -0,0 +1,4 @@
#!perl -w -Dt

my $x = 'APVM';
print "Hello, $x world!\n";
5 changes: 5 additions & 0 deletions example/hello-concise.pl
@@ -0,0 +1,5 @@
#!perl -w
use O Concise => '-exec';

my $x = 'APVM';
print "Hello, $x world!\n";
10 changes: 10 additions & 0 deletions example/hello-trace.pl
@@ -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";
9 changes: 9 additions & 0 deletions example/hello.pl
@@ -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";
17 changes: 17 additions & 0 deletions example/methcall.pl
@@ -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");
};
13 changes: 13 additions & 0 deletions example/quine.pl
@@ -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;
}
};
18 changes: 18 additions & 0 deletions example/trace.pl
@@ -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');
}

0 comments on commit 69038f0

Please sign in to comment.