# New Ticket Created by  Kevin Tew 
# Please include the string:  [perl #40438]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40438 >


Adding PIR methods to dynpmcs doesn't work.
When executed parrot just reports method not found.

Kevin Tew
=== t/dynpmc/subclass_with_pir_method.t
==================================================================
--- t/dynpmc/subclass_with_pir_method.t (revision 109)
+++ t/dynpmc/subclass_with_pir_method.t (local)
@@ -0,0 +1,44 @@
+#! perl
+# Copyright (C) 2001-2006, The Perl Foundation.
+# $Id: /parrot/offline/t/dynpmc/subclass_with_pir_method.t 2 
2006-09-24T18:45:23.994513Z svm  $
+
+use strict;
+use warnings;
+use lib qw( . lib ../lib ../../lib );
+
+use Test::More;
+use Parrot::Test tests => 1;
+
+=head1 NAME
+
+t/dynpmc/subclass_with_pir_method.t - test adding pir methods to dynpmc's PMC
+
+=head1 SYNOPSIS
+
+    % prove t/dynpmc/subclass_with_pir_method.t
+
+=head1 DESCRIPTION
+
+Tests the C<PerlString> PMC. Checks pir method execution in a dynpmc and a 
subclass of the pmc
+
+=cut
+
+pir_output_is(<<'CODE', <<'OUTPUT', "subclass with pir method");
+.HLL 'Perl', 'perl_group'
+.namespace ['PerlString']
+.sub 'perl_printhi' :method
+    print "HI from PerlString\n"
+.end
+
+.sub main :main
+  getclass $P2, 'PerlString'
+  subclass $P0, $P2, 'NewPerlString'
+  $P0.'perl_printhi'()
+  new $P1, 'NewPerlString'
+  $P1.'perl_printhi'()
+.end
+
+CODE
+HI from PerlString
+HI from PerlString
+OUTPUT

Property changes on: t/dynpmc/subclass_with_pir_method.t
___________________________________________________________________
Name: svn:mime-type
 +text/script

Reply via email to