Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Cross-Platform code

by GhodMode (Pilgrim)
on Feb 06, 2006 at 01:38 UTC ( [id://528129]=note: print w/replies, xml ) Need Help??


in reply to Cross-Platform code

Thanks to everyone...

I didn't know about File::Spec and I will definitely be using that.

Currently, my application consists of 16 Perl files and it's still growing. So, having a version of each of those, for each platform, isn't a good choice for me because they are still undergoing changes. I might need to make a change in the code, then have to remember to do it exactly the same way two more times.

I'm already using a separate configuration file. That does save some time when I need to copy the code to the other platforms.

The ScriptInterpreterSource directive is new to me also. It might save me the monotonous task of editing every file every time I move the code to the Windows box, but I am curious what I need to do to make it work. I've read the documentation . This may be a Windows question rather than a Perl question, but maybe you can still help me out: The doc says it will use Shell\ExecCGI\Command or, if it does not exist, Shell\Open\Command from HKEY_CLASSES_ROOT, but I checked and the only subkey I have for the .pl extension is PersistentHandler. Will it still work, or do I need to manually add the key?

Update : It worked! :) I had to manually add a registry key for the .pl extension in HKEY_CLASSES_ROOT I created keys: Shell/ExecCGI /Command, then (this is the part the doc doesn't mention) I created a string named command and it's value was c:\xampp\xampp\perl\bin\perl.exe %1. Until the registry key was exactly right, it relied on the #! line. I used ScriptInterpreterSource Registry as recommended. I couldn't get it to work with Registry-Strict.
(End of Update)

Eventually, this entire application will need to go on an installation CD with an autorun.inf that will put everything in the right place. I'll figure that out. I can even create a .reg file, if necessary.

I do all of my development on Linux, when possible, and I , personally, am case-sensitive :)

--
-- GhodMode

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found