diff options
| author | Joshua Peek <josh@joshpeek.com> | 2012-07-23 15:52:49 -0500 |
|---|---|---|
| committer | Joshua Peek <josh@joshpeek.com> | 2012-07-23 15:52:49 -0500 |
| commit | 7b6caa0f6c7603aabb5e6ed657e24aaddbeafc78 (patch) | |
| tree | ec0522eae75bb04ae73d28ae3f599682a2bfdaeb /samples/Perl/oo2.pl | |
| parent | 314f0e485227915931db361be14d308a210bedea (diff) | |
Rename samples subdirectories
Diffstat (limited to 'samples/Perl/oo2.pl')
| -rw-r--r-- | samples/Perl/oo2.pl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/samples/Perl/oo2.pl b/samples/Perl/oo2.pl new file mode 100644 index 0000000..82f2bdf --- /dev/null +++ b/samples/Perl/oo2.pl @@ -0,0 +1,27 @@ +#! perl + +# Copyright (C) 2004-2006, Parrot Foundation. + +use strict; +use warnings; + +for my $i ( 1 .. 500000 ) { + my $o = new Foo(); +} +my $o = new Foo(); +print $o->[0], "\n"; + +package Foo; + +sub new { + my $self = ref $_[0] ? ref shift : shift; + return bless [ 10, 20 ], $self; +} +1; + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: |
