Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Pass ENV to templates.

  • Loading branch information...
commit a7ba57de5ba6e55e1849a7d586700be1eae3e535 1 parent c1b8e39
authored December 31, 2012
4  lib/DDG/App/Publisher.pm
@@ -65,8 +65,8 @@ sub run {
65 65
 	# or from command line.
66 66
 	#
67 67
 
68  
-	warn qq(ENV DDG_MAX_CSS $ENV{DDG_MAX_CSS});
69  
-	warn qq(ENV DDG_MAX_JS $ENV{DDG_MAX_JS});
  68
+#	warn qq(ENV DDG_MAX_CSS $ENV{DDG_MAX_CSS});
  69
+#	warn qq(ENV DDG_MAX_JS $ENV{DDG_MAX_JS});
70 70
 
71 71
 	my $target = @ARGV
72 72
 		? shift @ARGV
8  lib/DDG/Publisher/File.pm
@@ -187,9 +187,15 @@ sub _build_content {
187 187
 	#
188 188
 	%vars = ( %vars, $self->code->($self,\%vars) );
189 189
 
  190
+	# 2012.12.31 need environment variables to capture the max js/css.
  191
+	%vars = ( %vars, 'ENV', \%ENV );
  192
+
190 193
 	# explicit getting out no_base for template decision later
191 194
 	my $no_base = defined $vars{no_base} && $vars{no_base};
192 195
 
  196
+#	use Data::Dumper;
  197
+#	warn Dumper($vars{'ENV'});
  198
+
193 199
 	#
194 200
 	# Gathering the save data for the data files generation
195 201
 	#
@@ -212,4 +218,4 @@ sub _build_content {
212 218
 	return $self->dir->site->template_engine->render($no_base ? $self->template : 'base.tx',\%vars);
213 219
 }
214 220
 
215  
-1;
  221
+1;

0 notes on commit a7ba57d

Please sign in to comment.
Something went wrong with that request. Please try again.