#!/usr/bin/perl
use strict;
use warnings;

use OpenSRF::System;                                            # <1>

# Bootstrap the system
OpenSRF::System->bootstrap_client(config_file => $ARGV[0]);     # <2>

my $session = OpenSRF::AppSession->create("open-ils.resolver"); # <3>

my $holdings = $session->request(                               # <4>
	"open-ils.resolver.resolve_holdings",                   # <5>
	"issn", "0022-362X"                                     # <6>
)->gather();                                                    # <7>

$session->disconnect();                                         # <8>

foreach my $holding (@$holdings) {
	foreach my $entry (keys %$holding) {
		print "$entry -> " . $holding->{$entry} . "\n";
	}
}
