blib/lib/Froody/ErrorType.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 3 / 3 totaltotal 90.6% 29 / 32 CC 1 SCAR 1.3
CC
1
Cov
91%
code
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/Froody/Response/String.pm ↑ Summary blib/lib/Froody/Logger.pm »
1 package Froody::ErrorType;
2 25 ▶use base qw(Froody::Structure);
Subroutine BEGIN: called CC=1 SCAR=0.0
3 25 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 25 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 25 ▶use Scalar::Util qw(blessed weaken);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 25 our $VERSION = 0.01;
9  
10 25 __PACKAGE__->mk_accessors( "name", "message" );
11 0 ▶sub code { my $self = shift; $self->name( @_ ) }
Subroutine code: not called CC=1 SCAR=6.9
Pod documented
12 19 ▶sub full_name { my $self = shift; $self->name( @_ ) }
Subroutine full_name: called CC=1 SCAR=0.0
Pod documented
13  
14 52 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod documented
15 52 my $self = shift;
16  
17 # set up the default structure
18 52 $self->structure({'err' => {
19 'attr' => [
20 'code',
21 'msg'
22 ],
23 'elts' => [],
24 }});
25 52 return $self;
26 }
27  
28 =head1 NAME
29  
30 Froody::ErrorType - object representing a Froody Error Type
31  
32 =head1 SYNOPSIS
33  
34 # create
35 use Froody::ErrorType;
36 my $method = Froody::ErrorType->new()
37 ->name("wibble.fred.burt")
38 ->message("Wibbling error.")
39  
40 =head1 DESCRIPTION
41  
42 =head1 METHODS
43  
44 =over
45  
46 =item name / code / full_name
47  
48 The name of the errortype. This is the code that is used to call this
49 type of error.
50  
51 =item structure
52  
53 The extracted structure of the errortype, with the top level node replaced with '.'.
54  
55 =cut
56  
57 =back
58  
59 =head1 BUGS
60  
61 None known.
62  
63 Please report any bugs you find via the CPAN RT system.
64 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody>
65  
66 =head1 AUTHOR
67  
68 Copyright Fotango 2005. All rights reserved.
69  
70 Please see the main L<Froody> documentation for details of who has worked
71 on this project.
72  
73 This module is free software; you can redistribute it and/or modify it under
74 the same terms as Perl itself.
75  
76 =head1 SEE ALSO
77  
78 L<Froody>, L<Froody::Repository>
79  
80 =cut
81  
82 25 1;
« blib/lib/Froody/Response/String.pm ↑ Summary blib/lib/Froody/Logger.pm »