App/Chart/Gtk2/Symlist/Constructed.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 39 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
can_edit
2.0
can_destroy
2.0
CRAP 2.0
1 # Copyright 2008, 2009, 2010, 2011 Kevin Ryde
2  
3 # This file is part of Chart.
4 #
5 # Chart is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 3, or (at your option) any later version.
8 #
9 # Chart is distributed in the hope that it will be useful, but WITHOUT ANY
10 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12 # details.
13 #
14 # You should have received a copy of the GNU General Public License along
15 # with Chart. If not, see <http://www.gnu.org/licenses/>.
16  
17 package App::Chart::Gtk2::Symlist::Constructed;
18 use 5.010;
19 use strict;
20 use warnings;
21  
22 use App::Chart::Gtk2::Symlist;
23 use Glib::Object::Subclass
24 'App::Chart::Gtk2::Symlist';
25  
26 my $keynum = 0;
27  
28 sub new {
29 my ($class, @symbols) = @_;
30 my $self = $class->SUPER::new (key => "_constructed_$keynum");
31  
32 local $self->{'reading_database'} = 1;
33 my $pos = 0;
34 foreach my $symbol (@symbols) {
35 $self->insert_with_values ($pos++, 0 => $symbol);
36 }
37 return $self;
38 }
39  
40 # sub INIT_INSTANCE {
41 # my ($self) = @_;
42 # }
43  
44 sub can_edit { return 0; }
45 sub can_destroy { return 0; }
46  
47 sub _reread {
48 }
49  
50 # sub name {
51 # my ($self) = @_;
52 # return $self->{'name'} || $self->SUPER::name;
53 # }
54 # sub symbol_list {
55 # my ($self) = @_;
56 # return $self->{'symbol_list'};
57 # }
58  
59 1;
60 __END__