NAME
CMS::Drupal::Admin::MaintenanceMode - Put your Drupal site into Maintenance Mode, or take it out
VERSION
version 0.92
SYNOPSIS
use CMS::Drupal::Admin::MaintenanceMode qw/ -all /;
my $on = 'yes' if maintenance_mode_check($dbh);
maintenance_mode_on($dbh);
maintenance_mode_off($dbh);
DESCRIPTION
This module provides methods to check whether your Drupal site is currently in maintenance mode, and to put it into and take it out of maintenance mode.
You might like to put the site into maintenance mode before running a script that reads from the DB, or perhaps you would like to have a monitoring tool able to shut off public access to the site if something bad happens.
Note that this and all CMS::Drupal::* Perl packages interact with the database directly, not with the website. You must have the user credentials for your database in order to use these tools.
METHODS
maintenance_mode_check
Returns 1 if the site is currently in maintenance mode, otherwise returns 0. Takes one argument; your active $dbh.
maintenance_mode_on
Puts the site into maintenance mode. Returns 1 if there was no failure; i.e. the site was successfully put into, or already was in, maintenance mode. Returns 0 on DB error. Takes one argument; your active $dbh.
maintenance_mode_off
Takes the site out of maintenance mode. Returns 1 if there was no failure; i.e. the site was successfully taken out of, or was already not in, maintenance mode. Returns 0 on DB error. Takes one argument; your active $dbh.
USAGE
Use the module as shown in the SYNOPSIS.
AUTHOR
Nick Tonkin <tonkin@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Nick Tonkin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.