[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#377520: debbugs: New SOAP infrastructure with first function for usertags



On Sun, 09 Jul 2006, Raphael Hertzog wrote:
> Please find in attachment a patch that implements a basic infrastructure
> to add SOAP support to the BTS.
> 
> I need that to get usertag data, so I implemented this first function but
> it's really easy to add new functions available over SOAP.
> 
> You'll have to install libsoap-lite-perl.
> 
> I would really appreciate that you put this patch live on the real
> BTS since the summer of code project of my student needs that...
> 
> Strictly speaking parts of the patch can be dropped, I simply
> modified the various CGI to be able to find the Debbugs module
> somewhere else than /usr/share/perl5 ... I think it's a useful
> addition so I left that in the patch.

Not really, because it requires hard coding the configuration file
location and loading that first; far better to use PERL_LIB or similar
to set it. [Or just install into the appropriate location if you're
using suexec or something.]

Couple comments really quick so I remember when I or someone else
applies this:
 
=== added directory 'Debbugs/SOAP'
=== added file 'Debbugs/SOAP/Usertag.pm'
--- /dev/null	
+++ Debbugs/SOAP/Usertag.pm	
@@ -0,0 +1,18 @@
+package Usertag;

should be package Debbugs::SOAP::Usertag;


=== added file 'cgi/soap.cgi'
--- /dev/null	
+++ cgi/soap.cgi	
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -wT
+
+package debbugs;
+
+use SOAP::Transport::HTTP;
+use vars qw($gSoapDir $gLibDir);
+
+BEGIN {
+    require '/etc/debbugs/config';
+    if (defined($gLibDir) && $gLibDir) {
+	push @INC, $gLibDir;
+    }
+}

This creates a dependency on the config file which isn't needed; same
with everything below..

+SOAP::Transport::HTTP::CGI
+    -> dispatch_to($gSoapDir, 'Usertag')

making this just Debbugs::SOAP::Usertag; is better... however I kind
of think that this will have to become Debbugs::SOAP eventually, with
the SOAP module use'ing all the appropriate sub modules.


Don Armstrong

-- 
<Clint> why the hell does kernel-source-2.6.3 depend on xfree86-common?
<infinity> It... Doesn't?
<Clint> good point

http://www.donarmstrong.com              http://rzlab.ucr.edu



Reply to: