Home : General : Perl Programming :

General: Perl Programming: Re: [delicia] custom messages: Edit Log

Here is the list of edits for this post
Re: [delicia] custom messages
Hi,

Why not make a common function that will just hold them as options? For example:


Code:
sub load_options {
return {
TABLE_FOO => {
name => "bla",
title => "something else",
success_message => "whatever"
},
ANOTHER_TABLE => {
name => "bla",
title => "something else",
success_message => "whatever"
},
SOMETHING => {
name => "bla",
title => "something else",
success_message => "whatever"
},
}

}

Then load with:

Code:
my $TBL_OPTS = load_options();

Then call with stuff like:

Code:
$TBL_OPTS->{SOMETHING }->{name}, $TBL_OPTS->{SOMETHING }->{success_message} , etc

Not sure how practice that is with your setup - but its worth a go Angelic

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Apr 3, 2013, 12:18 AM

Edit Log: