Gungho/Base.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
mk_virtual_methods
2.0
BEGIN
2.0
CRAP 2.0
1 # $Id: /mirror/gungho/lib/Gungho/Base.pm 31143 2007-11-27T06:57:15.188797Z lestrrat $
2 #
3 # Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp>
4 # All rights reserved.
5  
6 package Gungho::Base;
7 use strict;
8 use warnings;
9 use base qw(Gungho::Base::Class Class::Accessor::Fast);
10  
11 __PACKAGE__->mk_accessors($_) for qw(config);
12  
13 sub new
14 {
15 my $class = shift;
16 my $self = bless { @_ }, $class;
17 return $self;
18 }
19  
20 sub mk_virtual_methods
21 {
22 my $class = shift;
23 foreach my $method (@_) {
24 my $slot = "${class}::${method}";
25 {
26 no strict 'refs';
27 *{$slot} = sub { die(ref($_[0]) . "::${method} is not overridden") };
28 }
29 }
30 }
31  
32 1;
33  
34 __END__