module

How do I use Perl modules from their distribution directory?

Assume I downloaded Date::Calc from http://guest.engelschall.com/~sb/download/. Now, I have a script, xxx.pl, which resides in the same directory as the untar-ed "thing" that I downloaded from the link above When untar-ed, it creates a "Date-Calc-5.6" folder with tons of stuff. How do I include Date::Calc in xxx.pl? (I keep getting "Ca...

Python Changing module varibles in another module

Say I am importing the module 'foo' into the module 'bar'. Is it possible for me to change a global variable in foo inside bar? Let the global variable in foo be 'arbit'. Change arbit so that if bar were to call a function of foo that uses this variable, the updated variable is used rather than the one before that. ...

Should I add VOs into a library project when developing using flex modules?

I'm developing a module based applications in Flex and I was thinking about moving all my Value Objects (VOs) into a library project and I was wondering if any thinks this is a bad idea or have any alternative suggestions. Current Structure: I have a project that consist of a shell application and 3 modules. The modules contain about 1...

What happens in these Perl use lines?

I don't understand what happens here : use PAR { file => 'foo.par', fallback => 1 }; I think that's an anonymous hash. How is a module using it from the use line? Can you shed some light? EDIT: I'm not interested in the PAR module. I'm just interested in how that works behind the curtain. How can I configure my modules like that? ...

Can I you use __init__.py to define global variables?

I want to define a constant that should be available in all of the submodules of a package. I've thought that the best place would be in in the __init__.py file of the root package. But I don't know how to do this. Suppose I have a few subpackages and each with several modules. How can I access that variable from these modules? Of cours...

how do I determine whether a python script is imported as module or run as script?

The question is rather straightforward but not answered by searching. How do I determine in a python script whether this script is imported as a module or run as a script? Is there a difference at all in python? The problem is, that I want to evaluate the command line parameters only if run as a script, but not if the module is only imp...

installing additional apache modules

Hi I need to enable additional modules for apache eg, mod_proxy, mod_proxy-html, and mod_proxy_balancer. Is there a way for me to do that without recompiling the whole apache? Thanks ...

how to add additional module with easyapache

i'd like to install the mod_proxy_balancer module for apache via easyapache (whm's) UI. Can someone point me to the right direction to do this please? Thanks ...

In Perl are there disadvantages to generating getters and setters rather than hard-coding them?

In the example module below, the getters and setters are generated by adding anonymous subroutines to the symbol table. After the methods have been created in this manner, will the resulting code be functionally equivalent (in terms of behavior, speed, etc.) to a module with manually-written getters and setters, or does this approach hav...

easy way of installing python apps without using PYTHON path or muli symlink in site-package

Hi, I didn't want to install python modules using easy install, symlinks in site-packages or PYTHONPATH. So, I am trying something that I do wants system wide, then any application installation is done locally. Note, the root password is required only once here. First create a symblink of.../pythonX.Y/site-packages/mymodules -> /home/...

Why would you make a module from a block?

I was looking at this line: extensions << Module.new(&block) if block_given? It seems to create a new module and add it to an arry. Why would you build a module from a block though? The block could be anything and then the extensions array becomes unpredictable. Edit: This is from Sinatra's base class: def register(*extension...

Which Modular Application Frameworks does exist for ASP.NET

We are working on a Modular Framework for creating web-applications in ASP.NET in these days. Kind of influenced by the workings of the group behind the CAB Framework. How many other similar frameworks (if any) exists out there...? If there are any ones which are Open Source that would be considered a bonus since then I could check out ...

Access an instance from Terminal

Can't figure this out. In Terminal, I import a module which instantiates a class, which I haven't figured out how to access. Of course, I can always instantiate in Terminal: Server=Data.ServerData() Then I can get a result: Server.Property().DefaultChart However, I want to skip that step getting the result directly from the insta...

How do I load/unload a Linux kernel module with a Java Program?

I'm looking to load and unload a linux kernel module from my Java program. I initially tried doing it by using ProcessBuilder to run the commands, however it fails because the program doesnt have root access. Running my program as root also yields the same problem as it's a different process which needs the root access. So how do I acq...

Drupal Registration: Avoiding A Password

I'm not new to Drupal module development, but am new to the security system. Our users authenticate via a system-wide NetID, so we don't need or want a password. We do, however, still need a local user account so users can post, change their profile, etc. Because we needed this change fairly quickly, I've modified the /modules/user/user...

How does a Magento Payment Method Module integrate with the site's back-end

I found this related question which confirmed a lot of what I already thought but one question remains; how does a custom payment module integrate with the store's database? I am developing a custom payment method that transfers the user to a secure site, hosted by a bank in Australia which will process credit card transactions. For t...

how to override joomla module's method ?

Hi, I have a template that need to override the joomla module method (not template). I know how to override the template (tmpl) by creating /html/mod_abcd/ ... but is it possible to override the joomla module just for my templates ? I am using mod_frontpage and it seems the mod_frontpage delete things inside bracket ({ ... }) so i just...

How can I use Solaris::Kstat on Solaris 5.10?

Hi, I am looking to find the SunOS system details using Kstat. I have found Solaris::Kstat module in CPAN but this only supports Solaris 2.5.1, 2.6 & 2.7. The Sun developer's site mentions a Sun::Solaris::Kstat which I have not found in CPAN. Can anyone please help me with the Perl scripting to find details from kstat on Solaris 5.10. ...

FTP Handler in IIS to modify incoming requests

We need to setup an FTPS server using IIS to allow a client to pull files down from us. Our data center requires that all files be encrypted on disk and decrypted on the fly by our server before returning the file to the client. We've done similar things in the past for HTTPS by creating an HTTP Handler and doing the decryption in a cust...

How to programmatically set a global (module) variable?

I would like to define globals in a "programmatic" way. Something similar to what I want to do would be: definitions = {'a': 1, 'b': 2, 'c': 123.4} for definition in definitions.items(): exec("%s = %r" % definition) # a = 1, etc. Specifically, I want to create a module fundamentalconstants that contains variables that can be acc...