Subject: | suggestions for documentation |
Date: | Thu, 24 Feb 2011 20:25:29 -0800 (PST) |
To: | bug-template-declare [...] rt.cpan.org |
From: | Brigham Johnson <intotext [...] yahoo.com> |
http://search.cpan.org/~sartak/Template-Declare-0.44/lib/Template/Declare.pm
* Capitalize "here":
to the template being executed. here,
* double 'the'...
In the previous example, the the id,
* typo: Geniric
inherits from the first, MyApp::Templates::GeniricItem
* should be: tags -or- need "the"?
to dispatch to other tag
* Why isn't there a ";" after:
head {}
and
img { src is 'hello.jpg' }
and
caption { attr { label => 'Colors' } }
[Oh, because PITFALLS says this is okay? Even if kick in 'strict'?]
* Note that My::Post has not been defined, so we must use imagination:
my $post = My::Post->new(title => 'Hello', body => 'first post');
* When/where is 'list' executed via the second Template::Declare per:
we re-init() Template::Declare and execute its list template
* My imagination fails me: I think you are saying that other classes could be part of @template_classes and other 'print' statements could generate the other lines of the sample output.... I only see how the 'img src' line is made, i.e. 'image' is a template in one of the 'dispatch_to' classes, not how the 'div' and 'caption' lines come about in:
The output of this will be:
<div class="std">
<img src="foo.png" title="Foo" />
<p class="caption"></p>
</div>
* awkward phrasing, but don't know what to suggest:
determining which to use for particular class to show()
* removing the word "that" makes the following clearer:
but the useful bit that comes in
* What?:
Maybe you always pass have MyApp::UI::Standard
* removing the word "made" makes the following clearer:
In this way, made the formal image template
* need the word "to" after "classes":
to restore the template classes the default configuration, ...
By the way, a reminder like the following concerning @template_classes would have helpe me :-)
Remember, Template::Declare will search through @template_classes for 'image' in the same manner as searching through directories of a PATH variable.
Hey! in METHODS you disparage Jesse and deprecate 'roots' for thinking reverse order might be natural! I was thinking it was natural because I imagined a hash building up in which methods in the successive template classes acted as keys that clobber previously defined methods.
* The following is interesting but it would help this noob to see what $page was to begin with. And when/where was 'get_things' defined?:
So the page template calls....
* should 'politics' be in courier or somesuch?
Now let's mix that into a politics template class:
* in the Aliases example, it seems like the definition of 'Politics' is not a good example of DRY.
* improve readability if remove passive voice:
If you change:
For example, if this template was defined in Some::Mixin:
to:
For example, suppose you define this template in Some::Mixin:
then it makes sense to capitalize "Then" in the following paragraph of "Then show..." As it is, it seems like "Then" should be a continuation of the previous narrative and you must read the section a few times to rightly grasp its meaning.
* Capitalize 'by':
by default, Template::Declare renders a readable XML
* Capitalize 'so':
... overwriting the default values. so
* shouldn't 'three' be 'four'?
The coderef will receive three arguments:
* shouldn't 'mymixin' be 'mixin'?
will be mixed in as mymixin/foo.
* should 'template' be plural?:
resolves private template
* put 'if' in courier?:
an if statement
* update Copyright to 2011 :-)