[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. dc45c5a8649f8ae84d6b1382cc6ece8c2a4ee3fc

Stefan Hornburg racke at rt.icdevgroup.org
Mon Mar 22 16:32:39 UTC 2010


       via  dc45c5a8649f8ae84d6b1382cc6ece8c2a4ee3fc (commit)
      from  9e16e5e3937c6eb97eeb59c96fcef683269b3dfc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dc45c5a8649f8ae84d6b1382cc6ece8c2a4ee3fc
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Mon Mar 22 17:32:14 2010 +0100

    StartupHooks directive added

-----------------------------------------------------------------------

Summary of changes and diff:
 lib/WellWell/Core.pm |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/lib/WellWell/Core.pm b/lib/WellWell/Core.pm
index 7c0b476..4be1d45 100644
--- a/lib/WellWell/Core.pm
+++ b/lib/WellWell/Core.pm
@@ -25,6 +25,7 @@ use WellWell::Cart;
 
 # setup configuration directives
 Vend::Config::parse_directive('Hook', 'Hook hook');
+Vend::Config::parse_directive('StartupHooks', 'StartupHooks startup_hooks');
 
 # all what we want is to transfer CGI values from CGI to the Values
 # space, and nothing else
@@ -74,4 +75,21 @@ sub parse_hook {
 	return $C->{$item};
 }
 
+sub parse_startup_hooks {
+	my ($name, $routines) = @_;
+
+	$Vend::Config::Default{$name} = sub {
+		my $routines = shift;
+		my $save = $Vend::Cfg;
+		$Vend::Cfg = $Vend::Config::C;
+		$::Variable = $Vend::Cfg->{Variable};
+		$::Pragma = $Vend::Cfg->{Pragma};
+		Vend::Dispatch::run_macro($routines);
+		$Vend::Cfg = $save;
+		return 1;
+	};
+
+	return $routines || '';
+}
+
 1;


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list