Skip to content
Browse files

Merge branch 'master' of github.com:PerlDancer/advent-calendar

  • Loading branch information...
2 parents bbae7a7 + 55e50f3 commit 280077dc4190c7ce1bf34189da81c99f3f1a8c82 @yanick yanick committed Dec 9, 2012
View
13 danceradvent/lib/danceradvent.pm
@@ -63,15 +63,14 @@ get '/:year' => sub {
my $articles = _articles_viewable(params->{year});
- # If it's not the current year, also fetch the titles of all the posts so
- # the template can provide a list of named posts
- my @all_entries;
- if (params->{year} < (localtime)[5] + 1900) {
- @all_entries = _get_entries(params->{year});
- }
+ # Fetch the itles of all the posts so the template can provide a list
+ # of named posts. Exclude the today's article, to keep the mistery ;)
+ my $today = DateTime->today();
+ my @all_entries
+ = grep { $_->{issued} != $today } _get_entries(params->{year});
# Assemble a list of other years which have viewable articles for links:
- my @other_years;;
+ my @other_years;
for my $year (config->{start_year} .. (localtime)[5] + 1900) {
push @other_years, $year
if $year != params->{year} &&
View
2 danceradvent/public/articles/2012/7-dancer2-scoping.pod
@@ -1,4 +1,4 @@
-=head1 A first app with S<Dancer 2>
+=head1 A first app with Dancer 2
In the previous article we've seen how concrete S<Dancer 2> is, already. It's not
something in the air, it's real and is powering the website you're reading right
View
0 ...ublic/articles/2012/dancer2-templates.pod → ...lic/articles/2012/8-dancer2-templates.pod
File renamed without changes.
View
33 danceradvent/public/articles/2012/9-dancer-training-at-lpw2012.pod
@@ -0,0 +1,33 @@
+=head1 Dancer training at LPW2012
+
+Andrew Solomon again ran a helpful training session at this year's London Perl
+Workshop, L<Web development using Dancer|http://act.yapc.eu/lpw2012/talk/4425>
+which was a hands-on session to introduce Perl newbies to how easy web
+development can be using Perl and Dancer.
+
+The session covered:
+
+=over
+
+=item * learning to use the Dancer framework
+
+=item * learning to use Template Toolkit
+
+=item * understanding the concept of Model-View-Controller
+
+=item * how to structure code for maintainability
+
+=item * gaining experience using object oriented Perl modules
+
+=back
+
+There were 16 attendees, and feedback on the course was generally very positive.
+
+Dancer also appeared in the content of people's talks at LPW2012 too, which was
+great to see.
+
+=head1 AUTHOR
+
+David Precious (BIGPRESH)
+
+
View
3 danceradvent/views/index.tt
@@ -34,8 +34,7 @@ Advent Calendar affairs!)
[% IF all_entries.size %]
<h2>Full article list</h2>
<p>
- Since it's not [% year %] anymore, here's a full list of the posts with their
- titles:
+ Here's a full list of the previous posts with their titles:
</p>
<ol>
[% FOR a IN all_entries %]

0 comments on commit 280077d

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