Source code for modules.perl6.org - Perl 6 module listing
Perl JavaScript CSS Perl 6 Shell
Clone or download
Pull request Compare This branch is 774 commits ahead, 18 commits behind masak:master.
zoffixznet Harden metachecker against undefs
Avoids immediate error causing 
#108
Latest commit 71d4c79 Jul 17, 2018
Permalink
Failed to load latest commit information.
assets
bin
lib Harden metachecker against undefs Jul 17, 2018
public
t
templates Fill stars, issues for modules on cpan Apr 15, 2018
.gitignore
Build.PL
DEPLOYMENT.md
LICENSE
README.md
TODO-IDEAS.md
modules.perl6.org-init.d Explicitly specify PID file Jan 6, 2016
modules_perl6.conf
site-tips.txt
tag-aliases.json [REBUILD] Normalize "serialization" tag Oct 3, 2017
update-modules.perl6.org Defend against potential commit trigger conflict Aug 8, 2017
use-me-for-commit-triggers

README.md

modules.perl6.org

These are the scripts to generate the website on http://modules.perl6.org/

TODOs

Want to help out? Check if any open Issues exist that you might be able to solve. We also have a list of TODO ideas you might be interested in.

Development

Please use the following steps to aid you in your development:

  • Create a token with access to public repositories. To run the scripts, you need a GitHub token with rights to query Perl 6 module GitHub repository information.

  • Save the token in file named github-token

  • Install prerequisites for build script:

    $ perl Build.PL
    $ ./Build installdeps
  • Run build script
    $ perl bin/build-project-list.pl --limit=<number-of-modules>

You can also create file META.list.local that contains specific URLs you may wish to fetch for debug purposes. Use the --meta-list argument to specify the location of that file. See --help for all options.

  • The build script can start the Mojolicious app that powers the front end of you pass the --restart-app option:
    $ perl bin/build-project-list.pl --restart-app

For development purposes, you can use bin/morbo to power the web app, as it will watch for changes and auto-restart the app.

Changes to database

The build script uses a caching mechanism that avoids fetching extra info for a distro if no commits to it were made. If you made a change that needs to update database information for all dists, include string [REBUILD] (including the brackets) as the first thing in your commit message title. That will clear the cache and cause full rebuild.

If you made a change to the structure of the database, specify [NEWDB] as the first thing in the commit's title, to re-deploy site's database. When testing locally, you can just delete existing database file (the tables will be created by deploy from DBIC automatically).

Browser Support

We support the current and previous major releases of Chrome, Firefox, Internet Explorer (Edge), and Safari. Please test layout changes. Lacking actual browsers to test in, you can use browsershots.org or browserstack.com.

Front-End App

This is the app that reads the database generated by the build-project-list.pl script and displays web pages. See DEPLOYMENT.md

Seeing your changes

Once committed, the production cron job will pick up your changes on the 20th and 50th minutes of every hour. The script can take up to 10 minutes to complete.

20,50   *       *       *       *       sh update-modules.perl6.org > log/update.log 2>&1; cp log/update.log /var/www/modules.perl6.org/public/update.log

The cron job results can be found here.

If you only made changes to the web app, you can get them live a bit faster by using [REAPP] as first thing in commit message title (including brackets), which will cause the updater to restart the app after pulling and before rebuilding the db (which takes ~1.5hr)

Note About Cache

Certain data is cached by the site and is only updated when some event (like new commits to the dist's repo) happens. This includes travis statuses, logotypes, and Koality metrics. If your changes require doing so, you can trigger a full rebuild of the database and refresh of caches by including [REBUILD] as part of the title of your commit message.

If you are adding a feature that caches something, it needs to watch for FULL_REBUILD environmental variable and refresh the caches if that variable is set to a true value.

Author

Intial version contributed by patrickas++ on #perl6

LICENSE

See LICENSE file for the details of the license of the code in this repository.

This repository also contains code authored by third parties that may be licensed under a different license. Such files indicate the copyright and license terms at the top of the file. Currently these include: