package Zentangle;

use strict;
use Data::Dumper;

use Exporter;
use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS );
$VERSION = 1.00;
@ISA = qw( Exporter );

@EXPORT_OK = qw(
	$BASE_PATH
	$BASE_DIR
	$BASE_CGI_DIR
	$PROTOCOL_HOST
	$MASTER_SUB_DIR
	$URL_FILE
	$TAG_FILE
	convert_pattern_name_to_id
);

use vars qw(   
	$BASE_PATH
	$BASE_DIR
	$BASE_CGI_DIR
	$PROTOCOL_HOST
	$MASTER_SUB_DIR
	$URL_FILE
	$TAG_FILE
); 

$BASE_PATH      = "/home/www";
$BASE_PATH      = "/home/oldgods/oldgods.net" unless -d $BASE_PATH;
$BASE_DIR       = "zentangle";
$BASE_CGI_DIR   = "cgi-bin/zentangle";
$PROTOCOL_HOST  = "http://localhost";
$MASTER_SUB_DIR = "master_images";
$URL_FILE       = "urls.txt";
$TAG_FILE       = "tags.txt";

sub convert_pattern_name_to_id {
	my ($name) = @_;
	(my $id = $name) =~ s/[^a-z0-9-]/_/gi;
	return $id;
}

1;
