[Jifty-commit] r7486 - in Template-Declare/trunk: lib/Template lib/Template/Declare
Jifty commits
jifty-commit at lists.jifty.org
Mon Sep 7 01:54:36 EDT 2009
Author: theory
Date: Mon Sep 7 01:54:36 2009
New Revision: 7486
Modified:
Template-Declare/trunk/lib/Template/Declare.pm
Template-Declare/trunk/lib/Template/Declare/Buffer.pm
Template-Declare/trunk/lib/Template/Declare/Tags.pm
Template-Declare/trunk/t/99-pod-coverage.t
Log:
Completed POD coverage.
Modified: Template-Declare/trunk/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/trunk/lib/Template/Declare.pm (original)
+++ Template-Declare/trunk/lib/Template/Declare.pm Mon Sep 7 01:54:36 2009
@@ -387,10 +387,27 @@
}
+=head2 new_buffer_frame
+
+ $td->new_buffer_frame();
+
+Creates a new buffer frame.
+
+=cut
+
sub new_buffer_frame {
__PACKAGE__->buffer->push( private => 1 );
}
+=head2 end_buffer_frame
+
+ my $buf = $td->end_buffer_frame();
+
+Deletes and returns the buffer most recently added by a call to
+C<new_buffer_frame()>.
+
+=cut
+
sub end_buffer_frame {
__PACKAGE__->buffer->pop;
}
@@ -447,6 +464,10 @@
are any L</alias>ed paths for the root with prefixes that match the
template we're looking for.
+=head2 has_template TEMPLATE_PATH INCLUDE_PRIVATE_TEMPLATES
+
+An alias for C<resolve_template>.
+
=cut
sub resolve_template {
@@ -608,6 +629,43 @@
}
}
+=head2 package_variable( VARIABLE )
+
+ $td->package_variable( $varname => $value );
+ $value = $td->package_variable( $varname );
+
+Returns the value set for a template alias's variable. See L<alias/alias> for
+details.
+
+=cut
+
+sub package_variable {
+ my $self = shift;
+ my $var = shift;
+ if (@_) {
+ $TEMPLATE_VARS->{$self}->{$var} = shift;
+ }
+ return $TEMPLATE_VARS->{$self}->{$var};
+}
+
+=head2 package_variables( VARIABLE )
+
+ $td->package_variables( $variables );
+ $variables = $td->package_variables( );
+
+Get or set a hash reference of variables for a template alias. See
+L<alias/alias> for details.
+
+=cut
+
+sub package_variables {
+ my $self = shift;
+ if (@_) {
+ %{ $TEMPLATE_VARS->{$self} } = shift;
+ }
+ return $TEMPLATE_VARS->{$self};
+}
+
sub _templates_for {
my $tmpl = shift->templates->{+shift} or return;
return wantarray ? @{ $tmpl } : $tmpl;
@@ -708,24 +766,6 @@
*{ $class . '::' . $subname } = $coderef;
}
-sub package_variable {
- my $self = shift;
- my $var = shift;
- if (@_) {
- $TEMPLATE_VARS->{$self}->{$var} = shift;
- }
- return $TEMPLATE_VARS->{$self}->{$var};
-}
-
-sub package_variables {
- my $self = shift;
- my $var = shift;
- if (@_) {
- %{ $TEMPLATE_VARS->{$self} } = shift;
- }
- return $TEMPLATE_VARS->{$self};
-}
-
=head1 PITFALLS
We're reusing the perl interpreter for our templating langauge, but Perl was
Modified: Template-Declare/trunk/lib/Template/Declare/Buffer.pm
==============================================================================
--- Template-Declare/trunk/lib/Template/Declare/Buffer.pm (original)
+++ Template-Declare/trunk/lib/Template/Declare/Buffer.pm Mon Sep 7 01:54:36 2009
@@ -18,6 +18,12 @@
This class is deprecated; buffers in Template::Declare are now managed by L<String::BufferStack>.
+=begin comment
+
+=head2 new
+
+=end comment
+
=head1 SEE ALSO
L<Template::Declare>.
Modified: Template-Declare/trunk/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/trunk/lib/Template/Declare/Tags.pm (original)
+++ Template-Declare/trunk/lib/Template/Declare/Tags.pm Mon Sep 7 01:54:36 2009
@@ -426,6 +426,16 @@
return @_;
}
+=begin comment
+
+=head2 append_attr
+
+How does this work?
+
+=end comment
+
+=cut
+
sub append_attr {
die "Subroutine attr failed: $_[0] => '$_[1]'\n\t".
"(Perhaps you're using an unknown tag in the outer container?)";
@@ -764,6 +774,16 @@
}
+=begin comment
+
+=head2 show_page
+
+A private function?
+
+=end comment
+
+=cut
+
sub show_page {
my $template = shift;
my $args = \@_;
Modified: Template-Declare/trunk/t/99-pod-coverage.t
==============================================================================
--- Template-Declare/trunk/t/99-pod-coverage.t (original)
+++ Template-Declare/trunk/t/99-pod-coverage.t Mon Sep 7 01:54:36 2009
@@ -3,7 +3,6 @@
# XXX we need more POD...
my $skip_all = 1;
eval "use Test::Pod::Coverage";
-plan skip_all => "We know we don't have enough POD :(" if $skip_all;
plan skip_all => "Test::Pod::Coverage required for testing POD coverage" if $@;
all_pod_coverage_ok();
More information about the Jifty-commit
mailing list