Silki::Manual::Devel - Hack on Silki
In order to hack on Silki, you'll need to make sure that you can connect to Postgres without a username or password as yourself, and that you can create and drop databases.
In the future, this requirement may change, and patches are certainly welcome.
Silki uses Dist::Zilla to build the distribution. Unless you are planning on hacking on the release tool portion of Silki, you won't need this, but installing it may be useful. You'll also need a number of dzil plugins.
The Silki distribution includes a number of tools that are useful for development:
This runs a standalone server for Silki. This is very handy for development.
You can make it auto-restart when relevant files change. Here's the best command to do this:
bin/silki_server.pl -r \ --restart_directory lib \ --restart_directory share/i18n \ -rr (?:\/|^)(?!\.\#).+(?:\.pm|\.po)$ \ -d
This extracts strings which need localization. If you're just using English, you don't need to extract new strings immediately. By default, the English string is used as both the msgid and the translation of that string in English.
This rebuilds the Silki schema and optionally populates it with some initial users and wikis. Run it with the
--helpflag to see options. If you want to drop the existing schema you'll have to pass the
Typically, you'll run it like this:
> dev-bin/manage-db --db-name Silki --drop --seed
Be careful not to run this on a system where you have a production install of Silki! You could easily destroy a real database.
Some of the tests create a Fey::Schema object without talking to Postgres. This is faster than using Fey::Loader. This is done by using Storable to store a copy of the schema in a file. You can regenerate the serialized schema by running this command.
This inserts a whole bunch of pages into the database. This script could be improved to add more variations in the data, more user, revisions, etc.
Dave Rolsky <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Dave Rolsky.
This is free software, licensed under:
The GNU Affero General Public License, Version 3, November 2007