[Raleigh-talk] Issues after converting bash to Perl - way to call a config file that contains if/then logic

Mike South msouth at gmail.com
Tue Feb 22 08:05:13 PST 2011


On Tue, Feb 22, 2011 at 10:02 AM, Trevor Little <trevormg19 at gmail.com>wrote:

> "chatter" ne "mindless chatter"


You really don't need the double quotes if you're not interpolating
anything...

mike


>
>
> On Tue, Feb 22, 2011 at 11:00 AM, Mike South <msouth at gmail.com> wrote:
>
>>
>>
>> On Tue, Feb 22, 2011 at 9:47 AM, Trevor Little <trevormg19 at gmail.com>wrote:
>>
>>> Glad you got it working. Thanks for posting to the list. Good to see some
>>> chatter =)
>>
>>
>> Wait, you want chatter?  You should have said something!  That I can
>> definitely help with.
>>
>> mike
>>
>>
>>>
>>> Trevor
>>>
>>>  On Tue, Feb 22, 2011 at 10:41 AM, John Ricker <
>>> sephtin+pm-talk at gmail.com> wrote:
>>>
>>>> Trevor said >  However, I hesitate to even point that out since logic
>>>> in the config file is probably a bad idea as was pointed out. If you're hash
>>>> of all possible options is not super big (megabytes) I'd just go that route
>>>> and not worry about the memory. You may be optimizing prematurely.
>>>> Michael said > How many config variables are we talking about? If it's
>>>> less than a thousand I doubt you'll event notice the memory usage.
>>>>
>>>> I totally acknowledge that it's probably not a good idea, but it would
>>>> simplify things for me a bit..  Hash would as well (copy pasting, instead of
>>>> editing a ton of different files)..
>>>> The variables are all 8digit hex color codes, there are about 26 vars
>>>> that I'm expecting to grab from the config file (in hash scenario, would be
>>>> 26 members), and currently 19 different possibilities, will be 50 by the end
>>>> of the month, and I expect it to grow as themes/ROMs/probably devices are
>>>> added later.
>>>>
>>>> This whole thing takes place on a web server (including zipping, running
>>>> binaries to zipalig, and decompile some components), where I KNOW I have a
>>>> very limited amount of memory (256 with 384 burst, iirc), not to mention
>>>> there could be 50 people trying to run this at the same time.. :P  (Maybe
>>>> not now.. but in theory).
>>>> From the numbers, the variables are pretty insignificant... ;P
>>>>
>>>> Thanks for the example code Mike, from it I did find what I was doing
>>>> wrong last night... and got require working...
>>>> And Michael for the article... In my case, this will sit on a webserver
>>>> and users will never touch the config file... It's for me.
>>>>
>>>> The script is for android theming...
>>>> Currently, I have working a 'require', with 2 files.  one holds info on
>>>> the ROM (the stuff on the phone), and one holds info on the theme that the
>>>> user selected to apply.  The vars in each are compared, and if they don't
>>>> match up, then the file that holds that text is modified and marked for
>>>> inclusion (that's essentially how it works, anyway).
>>>>
>>>> I'd have to re-work a good bit of the script if I change over to hash,
>>>> so I'll add it to my todo list, but it works well now.  thanks again!
>>>>
>>>> -John
>>>>
>>>> _______________________________________________
>>>> Raleigh-talk mailing list
>>>> Raleigh-talk at pm.org
>>>> http://mail.pm.org/mailman/listinfo/raleigh-talk
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Raleigh-talk mailing list
>>> Raleigh-talk at pm.org
>>> http://mail.pm.org/mailman/listinfo/raleigh-talk
>>>
>>>
>>
>> _______________________________________________
>> Raleigh-talk mailing list
>> Raleigh-talk at pm.org
>> http://mail.pm.org/mailman/listinfo/raleigh-talk
>>
>>
>
> _______________________________________________
> Raleigh-talk mailing list
> Raleigh-talk at pm.org
> http://mail.pm.org/mailman/listinfo/raleigh-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/raleigh-talk/attachments/20110222/ddb3ca4c/attachment-0001.html>


More information about the Raleigh-talk mailing list