~ubuntu-branches/ubuntu/natty/libsignatures-perl/natty

« back to all changes in this revision

Viewing changes to t/subclass.t

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-05-18 20:34:44 UTC
  • Revision ID: james.westby@ubuntu.com-20090518203444-ee3iqibpk6uxo7u8
Tags: upstream-0.05
ImportĀ upstreamĀ versionĀ 0.05

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use warnings;
 
3
use Test::More tests => 1;
 
4
 
 
5
{
 
6
    package CustomSignature;
 
7
 
 
8
    use base qw/signatures/;
 
9
 
 
10
    use signatures;
 
11
 
 
12
    sub proto_unwrap ($class, $prototype) {
 
13
        return "my (\$prototype) = '$prototype';";
 
14
    }
 
15
}
 
16
 
 
17
BEGIN { CustomSignature->import }
 
18
 
 
19
sub foo (affe tiger) { $prototype }
 
20
 
 
21
is(foo(), 'affe tiger', 'overriding proto_unwrap');