Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Evaling Strings in Subs for Hashref Variable Names to Values

by CountZero (Bishop)
on Nov 12, 2012 at 18:03 UTC ( #1003485=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Evaling Strings in Subs for Hashref Variable Names to Values
in thread Evaling Strings in Subs for Hashref Variable Names to Values

I think SQL::Template might help you here. The SQL code is decoupled from your Perl-script and resides in an XML-file. The variable data is provided through a hash-reference.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re^3: Evaling Strings in Subs for Hashref Variable Names to Values
Re^4: Evaling Strings in Subs for Hashref Variable Names to Values
by theleftsock (Beadle) on Nov 13, 2012 at 14:38 UTC

    From a cursory readthrough, it looks like SQL::Template is very similar to what I am doing, only it has some markup with it. Might be more extensible, or it might be a good way to combine all my SQL into a single file for use.

    thanks -theleftsock

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-10-02 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (55 votes), past polls