sub perl2JSON {
my( $self, $perl ) = @_;
- return JSON->perl2JSON($perl);
+ my $json = JSON->perl2JSON($perl);
+ warn "Created JSON from perl:\n$json\n";
+ return $json;
}
sub JSON2perl {
my( $self, $perl ) = @_;
- return JSON->JSON2perl($perl);
+ warn "Turning JSON into perl:\n$perl\n";
+ my $obj = JSON->JSON2perl($perl);
+ warn "Created Perl from JSON: $obj \n";
+ return $obj;
}
sub perl2prettyJSON {
#my $base_xml_doc;
sub import {
- my( $self, $bs_config, $tdir, $core_xml ) = @_;
+ my( $self, $bs_config, $core_xml, @incs ) = @_;
$bootstrap = $bs_config;
$base_xml = $core_xml;
- $includes = [ $tdir ];
+ $includes = [ @incs ];
}
#parse the base xml file
#my $parser = XML::LibXML->new;
+ #$parser->expand_xinclude(1);
+
#$base_xml_doc = $parser->parse_file($base_xml);
}
return 0 unless $auth_token;
my $session = OpenSRF::AppSession->create("open-ils.auth");
- my $req = $session->request("open-ils.auth.session.retrieve", $auth_token );
+ my $req = $session->request(
+ "open-ils.auth.session.retrieve", $auth_token );
my $user = $req->gather(1);
return $user if ref($user);