| 1 | #+############################################################################## | ||
| 2 | # # | ||
| 3 | # File: Messaging/Message/Queue/NULL.pm # | ||
| 4 | # # | ||
| 5 | # Description: abstraction of a null message queue # | ||
| 6 | # # | ||
| 7 | #-############################################################################## | ||
| 8 | |||
| 9 | # | ||
| 10 | # module definition | ||
| 11 | # | ||
| 12 | |||
| 13 | package Messaging::Message::Queue::NULL; | ||
| 14 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 1 | our $VERSION = "1.7"; | |
| 17 | 1 | our $REVISION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/); | |
| 18 | |||
| 19 | # | ||
| 20 | # inheritance | ||
| 21 | # | ||
| 22 | |||
| 23 | 1 | our @ISA = qw(Messaging::Message::Queue); | |
| 24 | |||
| 25 | # | ||
| 26 | # used modules | ||
| 27 | # | ||
| 28 | |||
| 29 | 1 | ▶ | use No::Worries::Die qw(dief); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 30 | 1 | ▶ | use Params::Validate qw(validate_with); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 31 | |||
| 32 | # | ||
| 33 | # constructor | ||
| 34 | # | ||
| 35 | |||
| 36 | 1 | ▶ | sub new : method { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 37 | 1 | my($class, %option, $self); | |
| 38 | |||
| 39 | 1 | $class = shift(@_); | |
| 40 | 1 | %option = validate_with( | |
| 41 | params => \@_, | ||
| 42 | spec => {}, | ||
| 43 | allow_extra => 0, | ||
| 44 | ); | ||
| 45 | 1 | $self = {}; | |
| 46 | 1 | bless($self, $class); | |
| 47 | 1 | return($self); | |
| 48 | } | ||
| 49 | |||
| 50 | # | ||
| 51 | # Directory::Queue methods that can be used | ||
| 52 | # | ||
| 53 | |||
| 54 | 0 | ▶ | sub first : method { |
|
Subroutine
first: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 55 | 0 | return(""); | |
| 56 | } | ||
| 57 | |||
| 58 | 0 | ▶ | sub next : method { ## no critic 'ProhibitBuiltinHomonyms' |
|
Subroutine
next: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 59 | 0 | return(""); | |
| 60 | } | ||
| 61 | |||
| 62 | 1 | ▶ | sub count : method { |
|
Subroutine
count: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 63 | 1 | return(0); | |
| 64 | } | ||
| 65 | |||
| 66 | 0 | ▶ | sub purge : method { |
|
Subroutine
purge: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 67 | } | ||
| 68 | |||
| 69 | 0 | ▶ | sub path : method { |
|
Subroutine
path: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 70 | 0 | return("NULL"); | |
| 71 | } | ||
| 72 | |||
| 73 | 0 | ▶ | sub id : method { |
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 74 | 0 | return("NULL"); | |
| 75 | } | ||
| 76 | |||
| 77 | 0 | ▶ | sub add : method { |
|
Subroutine
add: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 78 | 0 | return(""); | |
| 79 | } | ||
| 80 | |||
| 81 | # | ||
| 82 | # Directory::Queue methods that cannot be used | ||
| 83 | # | ||
| 84 | |||
| 85 | 0 | ▶ | sub touch : method { |
|
Subroutine
touch: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 86 | 0 | dief("unsupported method: touch()"); | |
| 87 | } | ||
| 88 | |||
| 89 | 0 | ▶ | sub lock : method { ## no critic 'ProhibitBuiltinHomonyms' |
|
Subroutine
lock: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 90 | 0 | dief("unsupported method: lock()"); | |
| 91 | } | ||
| 92 | |||
| 93 | 0 | ▶ | sub unlock : method { |
|
Subroutine
unlock: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 94 | 0 | dief("unsupported method: unlock()"); | |
| 95 | } | ||
| 96 | |||
| 97 | 0 | ▶ | sub remove : method { |
|
Subroutine
remove: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 98 | 0 | dief("unsupported method: remove()"); | |
| 99 | } | ||
| 100 | |||
| 101 | 0 | ▶ | sub add_ref : method { |
|
Subroutine
add_ref: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 102 | 0 | dief("unsupported method: add_ref()"); | |
| 103 | } | ||
| 104 | |||
| 105 | 0 | ▶ | sub add_path : method { |
|
Subroutine
add_path: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 106 | 0 | dief("unsupported method: add_path()"); | |
| 107 | } | ||
| 108 | |||
| 109 | 0 | ▶ | sub get : method { |
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 110 | 0 | dief("unsupported method: get()"); | |
| 111 | } | ||
| 112 | |||
| 113 | 0 | ▶ | sub get_ref : method { |
|
Subroutine
get_ref: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 114 | 0 | dief("unsupported method: get_ref()"); | |
| 115 | } | ||
| 116 | |||
| 117 | 0 | ▶ | sub get_path : method { |
|
Subroutine
get_path: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 118 | 0 | dief("unsupported method: get_path()"); | |
| 119 | } | ||
| 120 | |||
| 121 | 0 | ▶ | sub copy : method { |
|
Subroutine
copy: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 122 | 0 | dief("unsupported method: copy()"); | |
| 123 | } | ||
| 124 | |||
| 125 | # | ||
| 126 | # add a message object to the queue | ||
| 127 | # | ||
| 128 | |||
| 129 | 1 | ▶ | sub add_message : method { |
|
Subroutine
add_message: called CC=1 SCAR=0.0
Pod
documented
| |||
| 130 | 1 | return("null"); | |
| 131 | } | ||
| 132 | |||
| 133 | # | ||
| 134 | # get a message object from the queue | ||
| 135 | # | ||
| 136 | |||
| 137 | 0 | ▶ | sub get_message : method { |
|
Subroutine
get_message: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 138 | 0 | dief("unsupported method: get_message()"); | |
| 139 | } | ||
| 140 | |||
| 141 | 1 | 1; | |
| 142 | |||
| 143 | __DATA__ | ||