| 1 | # -*- perl -*- | ||
| 2 | |||
| 3 | # Copyright (c) 2009 AdCopy | ||
| 4 | # Author: Jeff Weisberg | ||
| 5 | # Created: 2009-Dec-21 16:20 (EST) | ||
| 6 | # Function: | ||
| 7 | # | ||
| 8 | # $Id: Scriblr.pm,v 1.1 2010/11/01 18:41:44 jaw Exp $ | ||
| 9 | |||
| 10 | package AC::MrGamoo::Scriblr; | ||
| 11 | use AC::MrGamoo::Config; | ||
| 12 | use AC::MrGamoo::Debug 'scriblr'; | ||
| 13 | use AC::Import; | ||
| 14 | |||
| 15 | require 'AC/protobuf/std_reply.pl'; | ||
| 16 | require 'AC/protobuf/scrible.pl'; | ||
| 17 | |||
| 18 | use strict; | ||
| 19 | |||
| 20 | our @EXPORT = qw(filename); | ||
| 21 | |||
| 22 | sub filename { | ||
| 23 | my $file = shift; | ||
| 24 | |||
| 25 | if( $file =~ m|/\.| || $file =~ m|^\.| ){ | ||
| 26 | problem("invalid file '$file'"); | ||
| 27 | return; | ||
| 28 | } | ||
| 29 | return conf_value('basedir') . '/' . $file; | ||
| 30 | } | ||
| 31 | |||
| 32 | 1; |