Tom Wyant
and 1 contributors


display - Display results of Shire calendar routines


 display date_to_day_of_year 1419 3 25
 display weekday_name 2
 display -help
 display -version



This option displays the documentation for this script. The script then exits.


This option displays the version of this script. The script then exits.


This Perl script lets you play around with the subroutines in Date::Tolkien::Shire::Data. The command line arguments are the name of the subroutine to call (without the leading double underscore), and subsequent command line arguments are the subroutine arguments.

Generally, the subroutine is called in list context, and the results displayed. An exception is raised if the first argument does not specify an existing subroutine.

In the case of on_date_accented, standard output may contain non-ASCII characters, encoded in UTF-8. The only way I know of to get this to work under Perl 5.6.2 is to run this script as perl -C eg/display. Unfortunately putting the -C in the shebang line does not work. I would have done binmode STDOUT, ':encoding(utf-8), but that requires Perl 5.8. Caveat user.

The following subroutines have special-case code to handle them:


For __format(), the first command argument after 'format' is the template to use. Subsequent arguments specify the date to format, as nane/value pairs. These are made into a hash, and passed as the date argument of __format(). The result of formatting the given date using the given template are displayed.


Thomas R. Wyant, III wyant at cpan dot org


Copyright (C) 2017-2019 by Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.