[Jifty-commit] r5457 - Method-Inline/t

Jifty commits jifty-commit at lists.jifty.org
Sat May 10 16:24:56 EDT 2008


Author: clkao
Date: Sat May 10 16:24:56 2008
New Revision: 5457

Added:
   Method-Inline/t/guard.t

Log:
guard condition failing test.

Added: Method-Inline/t/guard.t
==============================================================================
--- (empty file)
+++ Method-Inline/t/guard.t	Sat May 10 16:24:56 2008
@@ -0,0 +1,26 @@
+use Test::More tests => 4;
+use ok 'Class::Accessor::Inline';
+
+package Foo;
+use base 'Class::Accessor::Inline';
+__PACKAGE__->mk_accessors(qw(foo bar));
+
+package Bar;
+
+sub foo {
+    return 'orzorz';
+}
+
+package main;
+
+my $foo = Foo->new( { foo => 'orz' });
+my $bar = bless { foo => 'fnord' }, 'Bar';
+
+sub hate {
+    my $who = shift;
+    $who->foo;
+}
+
+is(hate($foo), 'orz');
+is(hate($bar), 'orzorz');
+is(hate('Bar'), 'orzorz');


More information about the Jifty-commit mailing list