File: | blib/lib/Mediawiki/Blame/Revision.pm |
Coverage: | 100.0% |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mediawiki::Blame::Revision; | ||||||
2 | # $Revision: 8 $ | ||||||
3 | # $Date: 2007-08-01 15:01:36 +0200 (Mi, 01 Aug 2007) $ | ||||||
4 | 8 8 8 | 148 63 19 | use 5.008; | ||||
5 | 8 8 8 | 58 19 79 | use utf8; | ||||
6 | 8 8 8 | 64 17 58 | use strict; | ||||
7 | 8 8 8 | 58 18 75 | use warnings; | ||||
8 | 8 8 8 | 63 17 77 | use Class::Spiffy qw(-base field); | ||||
9 | 8 8 8 | 115 26 28 | use Perl::Version qw(); our $VERSION = Perl::Version->new('0.0.2')->stringify; | ||||
10 | |||||||
11 | my @field_names = qw(r_id timestamp contributor text); | ||||||
12 | for my $field_name (@field_names) { | ||||||
13 | field $field_name; | ||||||
14 | }; | ||||||
15 | |||||||
16 | sub _new { | ||||||
17 | 304 | 625 | my $class = shift; | ||||
18 | 304 | 664 | my $self = {}; | ||||
19 | 304 | 1085 | bless $self, $class; | ||||
20 | |||||||
21 | 304 | 972 | $self->r_id(shift); | ||||
22 | 304 | 966 | $self->timestamp(shift); | ||||
23 | 304 | 1041 | $self->contributor(shift); | ||||
24 | 304 | 936 | $self->text(shift); | ||||
25 | |||||||
26 | 304 | 1253 | return $self; | ||||
27 | }; | ||||||
28 | |||||||
29 | 1; | ||||||
30 |