]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/perlmods/OpenSRF/Application/Settings.pm
removed runtime print statement .. interfering with apache
[OpenSRF.git] / src / perlmods / OpenSRF / Application / Settings.pm
1 package OpenSRF::Application::Settings;
2 use OpenSRF::Application;
3 use OpenSRF::Utils::SettingsParser;
4 use base 'OpenSRF::Application';
5
6
7
8 __PACKAGE__->register_method( method => 'get_host_config', api_name => 'opensrf.settings.host_config.get' );
9 sub get_host_config {
10         my( $self, $client, $host ) = @_;
11         my $parser = OpenSRF::Utils::SettingsParser->new();
12         return $parser->get_server_config($host);
13 }
14
15
16
17
18 __PACKAGE__->register_method( method => 'xpath_get', api_name => 'opensrf.settings.xpath.get' );
19
20 __PACKAGE__->register_method( 
21                 method  => 'xpath_get', 
22                 api_name => 'opensrf.settings.xpath.get.raw' );
23
24 sub xpath_get {
25         my($self, $client, $xpath) = @_;
26         warn "*************** Received XPATH $xpath\n";
27         return  OpenSRF::Utils::SettingsParser->new()->_get_all( $xpath );
28 }
29
30
31 1;