| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package CGI::Mungo::Base; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | =pod | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | =head1 NAME | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | CGI::Mungo::Base - Base Mungo class | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | my $r = $mungo->getRequest(); | 
| 12 |  |  |  |  |  |  | my $params = $r->getParameters(); | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | Abstract class used in all other CGI::Mungo classes. | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | =head1 METHODS | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | =cut | 
| 21 |  |  |  |  |  |  |  | 
| 22 | 3 |  |  | 3 |  | 17 | use strict; | 
|  | 3 |  |  |  |  | 7 |  | 
|  | 3 |  |  |  |  | 88 |  | 
| 23 | 3 |  |  | 3 |  | 16 | use warnings; | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 457 |  | 
| 24 |  |  |  |  |  |  | ########################################################### | 
| 25 |  |  |  |  |  |  | sub new{ | 
| 26 | 4 |  |  | 4 | 0 | 10 | my $class = shift; | 
| 27 | 4 |  |  |  |  | 12 | my $self = { | 
| 28 |  |  |  |  |  |  | '_error' => undef | 
| 29 |  |  |  |  |  |  | }; | 
| 30 | 4 |  |  |  |  | 10 | bless $self, $class; | 
| 31 | 4 |  |  |  |  | 13 | return $self; | 
| 32 |  |  |  |  |  |  | } | 
| 33 |  |  |  |  |  |  | ######################################################### | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | =head2 setError($mesage) | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | $obj->setError($message); | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | Sets an error on the object, the message can be retrieved later. | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  | =cut | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | ######################################################### | 
| 44 |  |  |  |  |  |  | sub setError{ | 
| 45 | 1 |  |  | 1 | 1 | 504 | my($self, $error) = @_; | 
| 46 | 1 |  |  |  |  | 7 | $self->{'_error'} = $error; | 
| 47 | 1 |  |  |  |  | 3 | return 1; | 
| 48 |  |  |  |  |  |  | } | 
| 49 |  |  |  |  |  |  | ######################################################### | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | =pod | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | =head2 getError() | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | $error = $obj->getError(); | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | Retrieve a previously set error message. This method is used to | 
| 58 |  |  |  |  |  |  | determine the object's error state. | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | =cut | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | ######################################################### | 
| 63 |  |  |  |  |  |  | sub getError{ | 
| 64 | 4 |  |  | 4 | 1 | 8 | my $self = shift; | 
| 65 | 4 |  |  |  |  | 15 | return $self->{'_error'}; | 
| 66 |  |  |  |  |  |  | } | 
| 67 |  |  |  |  |  |  | ########################################################### | 
| 68 |  |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | =pod | 
| 70 |  |  |  |  |  |  |  | 
| 71 |  |  |  |  |  |  | =head1 Notes | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | =head1 Author | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  | MacGyveR | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | Development questions, bug reports, and patches are welcome to the above address | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | =head1 Copyright | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | Copyright (c) 2011 MacGyveR. All rights reserved. | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | =cut | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | ########################################################## | 
| 88 |  |  |  |  |  |  | return 1; |