blib/lib/Net/Intermapper/Map.pm

filter: Statementstmt 25.8% 37 / 143 Branchbran 0.0% 0 / 90 Conditioncond 0.0% 0 / 36 MC/DCmcdc 0.0% 0 / 18 Subroutinesub 33.3% 5 / 15 Podpod 100% 4 / 4 totaltotal 15.0% 46 / 306 CC 69 SCAR 57.0
CC
69
Cov
14%
toCSV
380.0
toTAB
380.0
toXML
306.0
CRAP 299.5
↑ Summary blib/lib/Net/Intermapper/Device.pm »
1 package Net::Intermapper::Map;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 BEGIN {
6 1 ▶ use Exporter ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS @HEADERS);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶ $VERSION = '0.02';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 @ISA = qw(Exporter);
10 1 @EXPORT = qw();
11 1 @EXPORT_OK = qw();
12 1 %EXPORT_TAGS = ();
13
14 1 @HEADERS = qw(MapId MapName MapPath Status DeviceCount NetworkCount InterfaceCount DownCount CriticalCount AlarmCount WarningCount OkayCount DataRetentionPolicy IMID Enabled Layer2);
15 };
16  
17 # MOOSE!
18  
19 has 'MapId' => (
20 is => 'rw',
21 isa => 'Str',
22 0 ▶ default => sub { ""; },
Subroutine __ANON__: not called CC=1 SCAR=6.9
23 1 );
24  
25 has 'MapName' => (
26 is => 'rw',
27 isa => 'Str',
28 0 ▶ default => sub { ""; },
Subroutine __ANON__: not called CC=1 SCAR=6.9
29 1 );
30  
31 has 'MapPath' => (
32 is => 'rw',
33 isa => 'Str',
34 0 ▶ default => sub { "/"; },
Subroutine __ANON__: not called CC=1 SCAR=6.9
35 1 );
36  
37 has 'Status' => (
38 is => 'rw',
39 isa => 'Str',
40 0 ▶ default => sub { ""; },
Subroutine __ANON__: not called CC=1 SCAR=6.9
41 1 );
42  
43 1 has 'DeviceCount' => (
44 is => 'ro',
45 isa => 'Str',
46 );
47  
48 1 has 'NetworkCount' => (
49 is => 'ro',
50 isa => 'Str',
51 );
52  
53 1 has 'InterfaceCount' => (
54 is => 'ro',
55 isa => 'Str',
56 );
57  
58 1 has 'DownCount' => (
59 is => 'ro',
60 isa => 'Str',
61 );
62  
63 1 has 'CriticalCount' => (
64 is => 'ro',
65 isa => 'Str',
66 );
67  
68 1 has 'AlarmCount' => (
69 is => 'ro',
70 isa => 'Str',
71 );
72  
73 1 has 'WarningCount' => (
74 is => 'ro',
75 isa => 'Str',
76 );
77  
78 1 has 'OkayCount' => (
79 is => 'ro',
80 isa => 'Str',
81 );
82  
83 1 has 'DataRetentionPolicy' => (
84 is => 'rw',
85 isa => 'Str',
86 );
87  
88 1 has 'IMID' => (
89 is => 'rw',
90 isa => 'Str',
91 );
92  
93 has 'Enabled' => (
94 is => 'rw',
95 isa => 'Str',
96 0 ▶ default => sub { ""; },
Subroutine __ANON__: not called CC=1 SCAR=6.9
97 1 );
98  
99 1 has 'Layer2' => (
100 is => 'rw',
101 isa => 'Str',
102 );
103  
104 # This methode is used for generating only wanted fields..
105 has 'mode' => ( # create, update, delete
106 is => 'rw',
107 isa => 'Str',
108 0 ▶ default => sub { "create"; },
Subroutine __ANON__: not called CC=1 SCAR=6.9
109 1 );
110
111 # No Moose
112
113 sub toXML
114 0 ▶{ my $self = shift;
Subroutine toXML: not called CC=17 SCAR=57.2
Pod documented
115 0 my $id = $self->Id;
116 0 my $result = "";
117 0 my $mapid = $self->MapId;
118 0 ▶ my $mapname = $self->MapName || "";
Condition0%0/2
$self->MapName || ''
l!l
00
MC/DC0%0/1
$self->MapName || ''
$self->MapName
Truth table0%0/2
A
A= $self->MapName
Aresult
11
00
119 0 ▶ my $mappath = $self->MapPath || "";
Condition0%0/2
$self->MapPath || ''
l!l
00
MC/DC0%0/1
$self->MapPath || ''
$self->MapPath
Truth table0%0/2
A
A= $self->MapPath
Aresult
11
00
120 0 ▶ my $status = $self->Status || "";
Condition0%0/2
$self->Status || ''
l!l
00
MC/DC0%0/1
$self->Status || ''
$self->Status
Truth table0%0/2
A
A= $self->Status
Aresult
11
00
121 0 ▶ my $devicecount = $self->DeviceCount || "";
Condition0%0/2
$self->DeviceCount || ''
l!l
00
MC/DC0%0/1
$self->DeviceCount || ''
$self->DeviceCount
Truth table0%0/2
A
A= $self->DeviceCount
Aresult
11
00
122 0 ▶ my $networkcount = $self->NetworkCount || "";
Condition0%0/2
$self->NetworkCount || ''
l!l
00
MC/DC0%0/1
$self->NetworkCount || ''
$self->NetworkCount
Truth table0%0/2
A
A= $self->NetworkCount
Aresult
11
00
123 0 ▶ my $interfacecount = $self->InterfaceCount || "";
Condition0%0/2
$self->InterfaceCount || ''
l!l
00
MC/DC0%0/1
$self->InterfaceCount || ''
$self->InterfaceCount
Truth table0%0/2
A
A= $self->InterfaceCount
Aresult
11
00
124 0 ▶ my $downcount = $self->DownCount || "";
Condition0%0/2
$self->DownCount || ''
l!l
00
MC/DC0%0/1
$self->DownCount || ''
$self->DownCount
Truth table0%0/2
A
A= $self->DownCount
Aresult
11
00
125 0 ▶ my $criticalcount = $self->CriticalCount || "";
Condition0%0/2
$self->CriticalCount || ''
l!l
00
MC/DC0%0/1
$self->CriticalCount || ''
$self->CriticalCount
Truth table0%0/2
A
A= $self->CriticalCount
Aresult
11
00
126 0 ▶ my $alarmcount = $self->AlarmCount || "";
Condition0%0/2
$self->AlarmCount || ''
l!l
00
MC/DC0%0/1
$self->AlarmCount || ''
$self->AlarmCount
Truth table0%0/2
A
A= $self->AlarmCount
Aresult
11
00
127 0 ▶ my $warningcount = $self->WarningCount || "";
Condition0%0/2
$self->WarningCount || ''
l!l
00
MC/DC0%0/1
$self->WarningCount || ''
$self->WarningCount
Truth table0%0/2
A
A= $self->WarningCount
Aresult
11
00
128 0 ▶ my $okaycount = $self->OkayCount || "";
Condition0%0/2
$self->OkayCount || ''
l!l
00
MC/DC0%0/1
$self->OkayCount || ''
$self->OkayCount
Truth table0%0/2
A
A= $self->OkayCount
Aresult
11
00
129 0 ▶ my $dataretentionpolicy = $self->DataRetentionPolicy || "";
Condition0%0/2
$self->DataRetentionPolicy || ''
l!l
00
MC/DC0%0/1
$self->DataRetentionPolicy || ''
$self->DataRetentionPolicy
Truth table0%0/2
A
A= $self->DataRetentionPolicy
Aresult
11
00
130 0 ▶ my $imid = $self->IMID || "";
Condition0%0/2
$self->IMID || ''
l!l
00
MC/DC0%0/1
$self->IMID || ''
$self->IMID
Truth table0%0/2
A
A= $self->IMID
Aresult
11
00
131 0 ▶ my $enabled = $self->Enabled || "";
Condition0%0/2
$self->Enabled || ''
l!l
00
MC/DC0%0/1
$self->Enabled || ''
$self->Enabled
Truth table0%0/2
A
A= $self->Enabled
Aresult
11
00
132 0 ▶ my $layer2 = $self->Layer2 || "";
Condition0%0/2
$self->Layer2 || ''
l!l
00
MC/DC0%0/1
$self->Layer2 || ''
$self->Layer2
Truth table0%0/2
A
A= $self->Layer2
Aresult
11
00
133 0 ▶ if ($id) { $result = " <id>$id</id>\n"; }
Branch: 1 branch
BranchTrueFalseTotal
if ($id) 0 0 0
134 0 return $result;
135 }
136  
137 sub toCSV
138 0 ▶{ my $self = shift;
Subroutine toCSV: not called CC=19 SCAR=59.4
Pod documented
139 0 my $id = $self->MapId;
140 0 my $result = "";
141 0 my @attributes = $self->meta->get_all_attributes;
142 0 my %attributes = ();
143 0 for my $attribute (@attributes)
144 0 ▶ { $attributes{$attribute->name} = $attribute->get_value($self) || "";
Condition0%0/2
$attribute->get_value($self) || ''
l!l
00
MC/DC0%0/1
$attribute->get_value($self) || ''
$attribute->get_value($self)
Truth table0%0/2
A
A= $attribute->get_value($self)
Aresult
11
00
145 }
146 0 for my $key (@HEADERS)
147 0 ▶ { if ($self->mode eq "create")
Branch: 1 branch
BranchTrueFalseTotal
if ($self->mode eq "create") 0 0 0
148 0 ▶ { next if $key eq "MapId";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "MapId" 0 0 0
149 0 ▶ next if $key eq "Status";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Status" 0 0 0
150 0 ▶ next if $key eq "DeviceCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DeviceCount" 0 0 0
151 0 ▶ next if $key eq "NetworkCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "NetworkCount" 0 0 0
152 0 ▶ next if $key eq "InterfaceCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "InterfaceCount" 0 0 0
153 0 ▶ next if $key eq "DownCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DownCount" 0 0 0
154 0 ▶ next if $key eq "CriticalCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "CriticalCount" 0 0 0
155 0 ▶ next if $key eq "AlarmCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "AlarmCount" 0 0 0
156 0 ▶ next if $key eq "WarningCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "WarningCount" 0 0 0
157 0 ▶ next if $key eq "OkayCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "OkayCount" 0 0 0
158 0 ▶ next if $key eq "DataRetentionPolicy";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DataRetentionPolicy" 0 0 0
159 0 ▶ next if $key eq "Enabled";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Enabled" 0 0 0
160 0 ▶ next if $key eq "Layer2";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Layer2" 0 0 0
161 0 ▶ next if $key eq "IMID";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "IMID" 0 0 0
162 0 $result .= $attributes{$key}.","; }
163 }
164 0 chop $result; # Remove the comma of the last field
165 0 $result =~ s/\s$//g;
166 0 $result .= "\r\n";
167 0 return $result;
168 }
169  
170 sub toTAB
171 0 ▶{ my $self = shift;
Subroutine toTAB: not called CC=19 SCAR=59.4
Pod documented
172 0 my $mapid = $self->MapId;
173 0 my $result = "";
174 0 my @attributes = $self->meta->get_all_attributes;
175 0 my %attributes = ();
176 0 for my $attribute (@attributes)
177 0 ▶ { $attributes{$attribute->name} = $attribute->get_value($self) || "";
Condition0%0/2
$attribute->get_value($self) || ''
l!l
00
MC/DC0%0/1
$attribute->get_value($self) || ''
$attribute->get_value($self)
Truth table0%0/2
A
A= $attribute->get_value($self)
Aresult
11
00
178 }
179 0 for my $key (@HEADERS)
180 0 ▶ { if ($self->mode eq "create")
Branch: 1 branch
BranchTrueFalseTotal
if ($self->mode eq "create") 0 0 0
181 0 ▶ { next if $key eq "MapId";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "MapId" 0 0 0
182 0 ▶ next if $key eq "Status";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Status" 0 0 0
183 0 ▶ next if $key eq "DeviceCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DeviceCount" 0 0 0
184 0 ▶ next if $key eq "NetworkCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "NetworkCount" 0 0 0
185 0 ▶ next if $key eq "InterfaceCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "InterfaceCount" 0 0 0
186 0 ▶ next if $key eq "DownCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DownCount" 0 0 0
187 0 ▶ next if $key eq "CriticalCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "CriticalCount" 0 0 0
188 0 ▶ next if $key eq "AlarmCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "AlarmCount" 0 0 0
189 0 ▶ next if $key eq "WarningCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "WarningCount" 0 0 0
190 0 ▶ next if $key eq "OkayCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "OkayCount" 0 0 0
191 0 ▶ next if $key eq "DataRetentionPolicy";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DataRetentionPolicy" 0 0 0
192 0 ▶ next if $key eq "Enabled";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Enabled" 0 0 0
193 0 ▶ next if $key eq "Layer2";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Layer2" 0 0 0
194 0 ▶ next if $key eq "IMID";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "IMID" 0 0 0
195 0 $result .= $attributes{$key}."\t";
196 }
197 }
198 0 chop $result; # Remove the comma of the last field
199 0 $result =~ s/\s$//g;
200 0 $result .= "\r\n";
201 0 return $result;
202 }
203  
204 sub header
205 0 ▶{ my $self = shift;
Subroutine header: not called CC=17 SCAR=57.2
Pod documented
206 0 ▶ my $format = shift || "";
Condition0%0/2
shift() || ''
l!l
00
MC/DC0%0/1
shift() || ''
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
207 0 my $header = "# format=$format table=maps fields=";
208 0 for my $key (@HEADERS)
209 0 ▶ { next if $key eq "MapId";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "MapId" 0 0 0
210 0 ▶ next if $key eq "Status";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Status" 0 0 0
211 0 ▶ next if $key eq "DeviceCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DeviceCount" 0 0 0
212 0 ▶ next if $key eq "NetworkCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "NetworkCount" 0 0 0
213 0 ▶ next if $key eq "InterfaceCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "InterfaceCount" 0 0 0
214 0 ▶ next if $key eq "DownCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DownCount" 0 0 0
215 0 ▶ next if $key eq "CriticalCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "CriticalCount" 0 0 0
216 0 ▶ next if $key eq "AlarmCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "AlarmCount" 0 0 0
217 0 ▶ next if $key eq "WarningCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "WarningCount" 0 0 0
218 0 ▶ next if $key eq "OkayCount";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "OkayCount" 0 0 0
219 0 ▶ next if $key eq "DataRetentionPolicy";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "DataRetentionPolicy" 0 0 0
220 0 ▶ next if $key eq "Enabled";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Enabled" 0 0 0
221 0 ▶ next if $key eq "Layer2";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "Layer2" 0 0 0
222 0 ▶ next if $key eq "IMID";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "IMID" 0 0 0
223 0 $header .= $key."\t,";
224 }
225 0 chop $header;
226 0 $header .= "\r\n";
227 0 return $header;
228 }
229  
230 =pod
231
232 =head1 NAME
233  
234 Net::Intermapper::Map - Interface with the HelpSystems Intermapper HTTP API - Maps
235  
236 =head1 SYNOPSIS
237  
238 use Net::Intermapper;
239 my $intermapper = Net::Intermapper->new(hostname=>"10.0.0.1", username=>"admin", password=>"nmsadmin");
240 # Options:
241 # hostname - IP or hostname of Intermapper 5.x server
242 # username - Username of Administrator user
243 # password - Password of user
244 # ssl - SSL enabled (1 - default) or disabled (0)
245 # port - TCP port for querying information. Defaults to 8181
246 # modifyport - TCP port for modifying information. Default to 443
247 # cache - Boolean to enable smart caching or force network queries
248  
249 my %users = $intermapper->users;
250 my $users_ref = $intermapper->users;
251 # Retrieve all users from Intermapper, Net::Intermapper::User instances
252 # Returns hash or hashref, depending on context
253
254 my %devices = $intermapper->devices;
255 my $devices_ref = $intermapper->devices;
256 # Retrieve all devices from Intermapper, Net::Intermapper::Device instances
257 # Returns hash or hashref, depending on context
258  
259 my %maps = $intermapper->maps;
260 my $maps_ref = $intermapper->maps;
261 # Retrieve all maps from Intermapper, Net::Intermapper::Map instances
262 # Returns hash or hashref, depending on context
263  
264 my %interfaces = $intermapper->interfaces;
265 my $interfaces_ref = $intermapper->interfaces;
266 # Retrieve all interfaces from Intermapper, Net::Intermapper::Interface instances
267 # Returns hash or hashref, depending on context
268  
269 my %vertices = $intermapper->vertices;
270 my $vertices_ref = $intermapper->vertices;
271 # Retrieve all vertices from Intermapper, Net::Intermapper::Vertice instances
272 # Returns hash or hashref, depending on context
273  
274 my $user = $intermapper->users->{"admin"};
275 print $user->header;
276 print $device->header;
277 print $map->header;
278 print $interface->header;
279 print $vertice->header;
280 # Generate 'directive' needed for manipulation. Mostly used internally.
281 # $user->mode("create"); # This changes the header fields
282 # $user->mode("update"); # This also changes the header fields
283 # Both are NOT needed when adding or updating a record
284 print $user->toTAB;
285 print $device->toXML;
286 print $map->toCSV;
287 # Works on ALL classes
288 # Produce human-readable output of each record.
289
290 my $user = Net::Intermapper::User->new(Name=>"testuser", Password=>"Test12345");
291 my $response = $intermapper->create($user);
292 # Create new user
293 # Return value is HTTP::Response object
294
295 my $device = Net::Intermapper::Device->new(Name=>"testDevice", MapName=>"TestMap", MapPath=>"/TestMap", Address=>"10.0.0.1");
296 my $response = $intermapper->create($device);
297 # Create new device
298 # Return value is HTTP::Response object
299  
300 $user->Password("Foobar123");
301 my $response = $intermapper->update($user);
302 # Update existing user
303 # Return value is HTTP::Response object
304  
305 my $user = $intermapper->users->{"bob"};
306 my $response = $intermapper->delete($user);
307 # Delete existing user
308 # Return value is HTTP::Response object
309  
310 my $device = $intermapper->devices->{"UniqueDeviceID"};
311 my $response = $intermapper->delete($device);
312 # Delete existing device
313 # Return value is HTTP::Response object
314  
315 my $users = { "Tom" => $tom_user, "Bob" => $bob_user };
316 $intermapper->users($users);
317 # At this point, there is no real reason to do this as update, create and delete work with explicit arguments.
318 # But it can be done with users, devices, interfaces, maps and vertices
319 # Pass a hashref to each method. This will NOT affect the smart-caching (only explicit calls to create, update and delete do this - for now).
320  
321 =head1 DESCRIPTION
322  
323 Net::Intermapper::Device is a perl wrapper around the HelpSystems Intermapper API provided through HTTP/HTTPS for access to map information.
324  
325 All calls are handled through an instance of the L<Net::Intermapper> class.
326  
327 use Net::Intermapper;
328 my $intermapper = Net::Intermapper->new(hostname => '10.0.0.1', username => 'admin', password => 'nmsadmin');
329  
330 =head1 USAGE
331
332 =over 3
333  
334 =item new
335  
336 Class constructor. Returns object of Net::Intermapper::Map on succes. Attributes are:
337  
338 =over 5
339  
340 =item MapId (read-only)
341  
342 A unique, persistant identifier for this map instance.
343  
344 =item MapName (read-only). This value is used for lookups in the C<users> method in L<Net::Intermapper>.
345  
346 Name of the map.
347  
348 =item MapPath (read-only)
349  
350 Full path of the map, including the name of the map.
351  
352 =item Status (read-only)
353  
354 Status of the map (e.g. down, critical, alarm, warning, okay).
355  
356 =item DeviceCount (read-only)
357  
358 Number of devices in the map.
359  
360 =item NetworkCount (read-only)
361  
362 Number of networks in the map.
363  
364 =item InterfaceCount (read-only)
365  
366 Number of interfaces in the map.
367  
368 =item DownCount (read-only)
369  
370 Number of devices that are down.
371  
372 =item CriticalCount (read-only)
373  
374 Number of devices in critical status.
375  
376 =item AlarmCount (read-only)
377  
378 Number of devices in alarm status.
379  
380 =item WarningCount (read-only)
381  
382 Number of devices in warning status.
383  
384 =item OkayCount (read-only)
385  
386 Number of okay devices.
387  
388 =item DataRetentionPolicy (read-only)
389  
390 Database retention policy.
391  
392 =item IMID (read-only)
393  
394 Identifier of the map in the IMID format.
395  
396 =item Enabled (read-only)
397  
398 True if the map is currently running.
399  
400 =item Layer2 (read-only)
401  
402 True if the map is enabled for layer 2 polling.
403  
404 =back
405  
406 =over 3
407  
408 =item header
409  
410 Returns the C<directive> aka data header required by the Intermapper API to perform CRUD actions. This is handled through the C<create>, C<update> and C<delete> method and should not really be used.
411  
412 =back
413  
414 =over 3
415  
416 =item toTAB
417  
418 Returns the object data formatted in TAB delimited format. Used in combination with the C<header> and the C<format> method in L<Net::Intermapper> to perform CRUD actions. This is handled through the C<create>, C<update> and C<delete> method and should not really be used.
419  
420 =back
421  
422 =over 3
423  
424 =item toCSV
425  
426 Returns the object data formatted in Comma Separated delimited format. Used in combination with the C<header> and the C<format> method in L<Net::Intermapper> to perform CRUD actions. This is handled through the C<create>, C<update> and C<delete> method and should not really be used.
427  
428 =back
429  
430 =over 3
431  
432 =item toXML
433  
434 Returns the object data formatted in XML format. Used in combination with the C<header> and the C<format> method in L<Net::Intermapper> to perform CRUD actions. This is handled through the C<create>, C<update> and C<delete> method and should not really be used.
435  
436 =back
437  
438 =over 3
439  
440 =item mode
441  
442 Internal method to properly format the data and header for CRUD actions. Typically not used.
443  
444 =back
445  
446 =item $ERROR
447  
448 NEEDS TO BE ADDED
449  
450 This variable will contain detailed error information.
451
452 =back
453  
454 =head1 REQUIREMENTS
455  
456 For this library to work, you need an instance with Intermapper (obviously) or a simulator like L<Net::Intermapper::Mock>.
457  
458 =over 3
459  
460 =item L<Moose>
461  
462 =item L<IO::Socket::SSL>
463  
464 =item L<LWP::UserAgent>
465  
466 =item L<XML::Simple>
467  
468 =item L<MIME::Base64>
469  
470 =item L<URI::Escape>
471  
472 =back
473  
474 =head1 BUGS
475  
476 None yet
477  
478 =head1 SUPPORT
479  
480 None yet :)
481  
482 =head1 AUTHOR
483  
484 Hendrik Van Belleghem
485 CPAN ID: BEATNIK
486 hendrik.vanbelleghem@gmail.com
487  
488 =head1 COPYRIGHT
489  
490 This program is free software licensed under the...
491  
492 The General Public License (GPL)
493 Version 2, June 1991
494  
495 The full text of the license can be found in the
496 LICENSE file included with this module.
497  
498  
499 =head1 SEE ALSO
500  
501 L<http://download.intermapper.com/docs/UserGuide/Content/09-Reference/09-05-Advanced_Importing/the_directive_line.htm>
502 L<http://download.intermapper.com/schema/imserverschema.html>
503  
504 =cut
505  
506 #################### main pod documentation end ###################
507 1 __PACKAGE__->meta->make_immutable();
508  
509 1 1;
510 # The preceding line will help the module return a true value
511  
↑ Summary blib/lib/Net/Intermapper/Device.pm »