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

SF.net SVN: ledger-smb:[5114] addons/1.3



Revision: 5114
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5114&view=rev
Author:   einhverfr
Date:     2012-08-17 10:27:50 +0000 (Fri, 17 Aug 2012)
Log Message:
-----------
Adding compatibility patches for plack/Starlet to be merged once well tested

Added Paths:
-----------
    addons/1.3/plack-starlet/
    addons/1.3/plack-starlet/trunk/
    addons/1.3/plack-starlet/trunk/patches/
    addons/1.3/plack-starlet/trunk/patches/plack-starlet.patch
    addons/1.3/plack-starlet/trunk/tools/
    addons/1.3/plack-starlet/trunk/tools/ledgersmb.psgi

Added: addons/1.3/plack-starlet/trunk/patches/plack-starlet.patch
===================================================================
--- addons/1.3/plack-starlet/trunk/patches/plack-starlet.patch	                        (rev 0)
+++ addons/1.3/plack-starlet/trunk/patches/plack-starlet.patch	2012-08-17 10:27:50 UTC (rev 5114)
@@ -0,0 +1,276 @@
+Index: lsmb-request.pl
+===================================================================
+--- lsmb-request.pl	(revision 4983)
++++ lsmb-request.pl	(working copy)
+@@ -25,7 +25,6 @@
+ use Error qw(:try);
+ 
+ $| = 1;
+-
+ binmode (STDIN, ':bytes');
+ binmode (STDOUT, ':utf8');
+ use LedgerSMB::User;
+Index: LedgerSMB/App_State.pm
+===================================================================
+--- LedgerSMB/App_State.pm	(revision 4983)
++++ LedgerSMB/App_State.pm	(working copy)
+@@ -121,6 +121,7 @@
+     $DBName = undef;
+     @Roles = ();
+     $Role_Prefix = undef;
++    $ENV{LSMB_NOHEAD} = 0;
+ }
+ 
+ 1;
+Index: old-handler.pl
+===================================================================
+--- old-handler.pl	(revision 5035)
++++ old-handler.pl	(working copy)
+@@ -46,7 +46,24 @@
+ #
+ #######################################################################
+ 
+-use LedgerSMB::Sysconfig;
++# Clearing all namespaces for persistant code use
++for my $nsp (qw(lsmb_legacy Form CA GL AA IS IR OE RP JC PE IC AM BP CP PE User)) {    
++   for my $k (keys %{"${nsp}::"}){
++        next if $k =~ /[A-Z]+/;
++        next if $k eq 'try' or $k eq 'catch';
++        next if *{"${nsp}::{$k}"}{CODE};
++        if (*{"${nsp}::{$k}"}{ARRAY}) {
++            @{"${nsp}::{$k}"} = () unless /^(?:INC|ISA|EXPORT|EXPORT_OK|ARGV|_|\W)$/;
++        }
++        if (*{"${nsp}::{$k}"}{HASH}) {
++            %{"${nsp}::{$k}"} = ();
++        }
++        if (*{"${nsp}::{$k}"}{SCALAR}){
++           ${"${nsp}::{$k}"} = undef;
++        }
++    }   
++}
++package lsmb_legacy;
+ use Digest::MD5;
+ use Error qw(:try);
+ use LedgerSMB::App_State;
+@@ -62,7 +79,9 @@
+ use LedgerSMB::CancelFurtherProcessing;
+ use LedgerSMB::App_State;
+ use Data::Dumper;
++$Data::Dumper::Sortkeys = 1;
+ 
++
+ our $logger=Log::Log4perl->get_logger('old-handler-chain');#make logger available to other old programs
+ 
+ require "common.pl";
+@@ -158,6 +177,7 @@
+ 
+     binmode STDOUT, ':utf8';
+     binmode STDERR, ':utf8';
++    $Data::Dumper::Sortkeys=1;
+     # window title bar, user info
+     $form->{titlebar} =
+         "LedgerSMB "
+Index: bin/is.pl
+===================================================================
+--- bin/is.pl	(revision 5025)
++++ bin/is.pl	(working copy)
+@@ -43,6 +43,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::IS;
+ use LedgerSMB::PE;
+ use LedgerSMB::Tax;
+Index: bin/pw.pl
+===================================================================
+--- bin/pw.pl	(revision 4983)
++++ bin/pw.pl	(working copy)
+@@ -34,6 +34,7 @@
+ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::Template;
+ 
+ 1;
+Index: bin/ap.pl
+===================================================================
+--- bin/ap.pl	(revision 4983)
++++ bin/ap.pl	(working copy)
+@@ -45,6 +45,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::PE;
+ use LedgerSMB::IR;
+ 
+Index: bin/bp.pl
+===================================================================
+--- bin/bp.pl	(revision 4983)
++++ bin/bp.pl	(working copy)
+@@ -38,6 +38,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::BP;
+ use LedgerSMB::Template;
+ 
+Index: bin/gl.pl
+===================================================================
+--- bin/gl.pl	(revision 5032)
++++ bin/gl.pl	(working copy)
+@@ -45,6 +45,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::GL;
+ use LedgerSMB::PE;
+ use LedgerSMB::Template;
+Index: bin/ar.pl
+===================================================================
+--- bin/ar.pl	(revision 4983)
++++ bin/ar.pl	(working copy)
+@@ -40,6 +40,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::PE;
+ use LedgerSMB::IS;
+ 
+Index: bin/ir.pl
+===================================================================
+--- bin/ir.pl	(revision 5025)
++++ bin/ir.pl	(working copy)
+@@ -38,6 +38,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::IR;
+ use LedgerSMB::PE;
+ use LedgerSMB::Tax;
+Index: bin/aa.pl
+===================================================================
+--- bin/aa.pl	(revision 5025)
++++ bin/aa.pl	(working copy)
+@@ -44,6 +44,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::Tax;
+ 
+ # any custom scripts for this one
+Index: bin/rp.pl
+===================================================================
+--- bin/rp.pl	(revision 4983)
++++ bin/rp.pl	(working copy)
+@@ -41,6 +41,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use Error qw(:try);
+ 
+ require "bin/arap.pl";
+Index: bin/arap.pl
+===================================================================
+--- bin/arap.pl	(revision 4983)
++++ bin/arap.pl	(working copy)
+@@ -38,6 +38,7 @@
+ # common routines for gl, ar, ap, is, ir, oe
+ #
+ 
++package lsmb_legacy;
+ use LedgerSMB::AA;
+ 
+ # any custom scripts for this one
+Index: bin/ic.pl
+===================================================================
+--- bin/ic.pl	(revision 5031)
++++ bin/ic.pl	(working copy)
+@@ -40,6 +40,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::IC;
+ use LedgerSMB::Tax;
+ 
+Index: bin/jc.pl
+===================================================================
+--- bin/jc.pl	(revision 4983)
++++ bin/jc.pl	(working copy)
+@@ -39,6 +39,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use Error qw(:try);
+ 
+ use LedgerSMB::Template;
+Index: bin/am.pl
+===================================================================
+--- bin/am.pl	(revision 4983)
++++ bin/am.pl	(working copy)
+@@ -32,6 +32,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::AM;
+ use LedgerSMB::CA;
+ use LedgerSMB::Form;
+Index: bin/oe.pl
+===================================================================
+--- bin/oe.pl	(revision 5043)
++++ bin/oe.pl	(working copy)
+@@ -39,6 +39,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::OE;
+ use LedgerSMB::IR;
+ use LedgerSMB::IS;
+Index: bin/arapprn.pl
+===================================================================
+--- bin/arapprn.pl	(revision 4983)
++++ bin/arapprn.pl	(working copy)
+@@ -39,6 +39,7 @@
+ # printing routines for ar, ap
+ #
+ 
++package lsmb_legacy;
+ use Error qw(:try);
+ use LedgerSMB::Template;
+ use LedgerSMB::Company_Config;
+Index: bin/pe.pl
+===================================================================
+--- bin/pe.pl	(revision 4983)
++++ bin/pe.pl	(working copy)
+@@ -17,6 +17,7 @@
+ #
+ #======================================================================
+ 
++package lsmb_legacy;
+ use LedgerSMB::PE;
+ use LedgerSMB::AA;
+ use LedgerSMB::OE;
+Index: bin/io.pl
+===================================================================
+--- bin/io.pl	(revision 4983)
++++ bin/io.pl	(working copy)
+@@ -38,6 +38,7 @@
+ #
+ #######################################################################
+ 
++package lsmb_legacy;
+ use Error qw(:try);
+ use LedgerSMB::Tax;
+ use LedgerSMB::Template;

Added: addons/1.3/plack-starlet/trunk/tools/ledgersmb.psgi
===================================================================
--- addons/1.3/plack-starlet/trunk/tools/ledgersmb.psgi	                        (rev 0)
+++ addons/1.3/plack-starlet/trunk/tools/ledgersmb.psgi	2012-08-17 10:27:50 UTC (rev 5114)
@@ -0,0 +1,26 @@
+#!/usr/bin/plackup
+
+  my $path = "/usr/local/ledgersmb_1.3";
+
+  use Plack::App::CGIBin;
+  use Plack::Builder;
+  #use LedgerSMB;
+  #use LedgerSMB::Form;
+  #use CGI::Simple;
+  #$CGI::Simple::DISABLE_UPLOADS = 0;
+  #use Data::Dumper;
+  #use LedgerSMB::Template;
+  #use LedgerSMB::Template::HTML;
+  #use LedgerSMB::Template::LaTeX;
+  #use LedgerSMB::User;
+  #use LedgerSMB::Locale;
+  #use Try::Tiny;
+  #use Log::Log4perl;
+
+  my $app = Plack::App::CGIBin->new(root => "$path")->to_app;
+  builder {
+       enable "Plack::Middleware::Static",
+        path => qr!ledgersmb_1.3/(css|images|favicon|UI)/!,
+        root => "../";
+      mount '/ledgersmb_1.3' => $app;
+  }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.