Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Multidimensional arrays

by Arunbear (Prior)
on Jun 07, 2023 at 16:57 UTC ( [id://11152681]=note: print w/replies, xml ) Need Help??


in reply to Multidimensional arrays

Needing an extra dimension makes me wonder if these new details should also live in the database? One benefit would be to remove much of the duplicated info introduced above (via normalization).

Replies are listed 'Best First'.
Re^2: Multidimensional arrays
by Bod (Parson) on Jun 07, 2023 at 20:44 UTC
    makes me wonder if these new details should also live in the database

    Yes - they probably should!

    Most of my sites have multiple environments with identical copies of the codebase except for a Variables.pm file that defines things like the DB instance to connect to, Stripe and other keys. Naturally, the Stripe price keys got put in there which is sensible when there are just 3 keys.

    I was planning to extend what I already had. Then I realised that I probably needed a method in the common module for the site to return the correct Stripe price keys. Your observation that these are better stored in the DB really does make sense especially as a method is needed to read them anyway. It may as well just read the database!

    Thanks you pointing out that to which I has cognitive blindness :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-24 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found