small reporter updates
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 Oct 2005 14:11:07 +0000 (14:11 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 Oct 2005 14:11:07 +0000 (14:11 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1897 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Template/Plugin/WebUtils.pm
Open-ILS/src/perlmods/OpenILS/WWW/Reporter.pm

index 2fe9b08..84c45cb 100644 (file)
@@ -26,12 +26,17 @@ sub XML2perl {
 
 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 {
index 4da4372..64b786a 100644 (file)
@@ -29,10 +29,10 @@ my $base_xml;
 #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 ];
 }
 
 
@@ -44,6 +44,8 @@ sub child_init {
 
        #parse the base xml file
        #my $parser = XML::LibXML->new;
+       #$parser->expand_xinclude(1);
+
        #$base_xml_doc = $parser->parse_file($base_xml);
 
 }
@@ -128,7 +130,8 @@ sub verify_login {
        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);