#!/usr/bin/perl ####################################################################### # # An example of how to use the LCFG::Inventory module # # Stephen Quinney # Version 1.1.18 : 27/07/07 11:42 # # ** Generated file : do not edit ** # ####################################################################### use strict; use lib qw(); use LCFG::Inventory; my $inv = new LCFG::Inventory (# URL => "http://blah", # URL # CACHE => "/foo/mycache", # Persistent cache # DEBUG => 1, # Debugging # FORCE => 1, # Force refresh the cache # NOFETCH => 1 # Use cache copy only ); die "$@" unless ($inv); foreach my $fqdn ($inv->Hosts()) { my $host = $inv->Lookup($fqdn); print "$fqdn is a ".$host->{'model'}."\n"; } my $meta = $inv->Meta(); print "inventory published at ".$meta->{'published_at'}."\n";