How to implement a Configuration Menu with Perl - perl

I am trying to implement some kind of console menu wich has to retrieve a lot of parameters from user in order to build an XML in the end. At every step I need to do some checks on the given parameters but ofcourse those checks are different every step. Is there an easy library that can help me? With easy I mean something that already offers a pattern, I don't want to write thousands lines of codes.

What about one of these modules:
Term::Menus
Getopt::Std

Related

The easiest way to read uvm_object from file given by uvm_object sprint method

While verrifying VDU(video display unit) I faced next issue.
The VDU gets its settings from uvm_object class and I write thees settings into file using sprint method. Can you recommend me the best way to read this file back into uvm_object. In other words are there a methods inside UVM to read object properties back from the file with uvm_printer format? Or I need to implement this kind of functionality from scratch.
Thank you in advanced.
The UVM provides no mechanism to read back settings output to a file from sprint()—you will have to implement this from scratch. You might consider outputting in a simpler format to make reading back easier.

Script to fill browser form

I have little business problem, I need to make a script to fill (not send) out browser forms(only simple textfields, checkboxes and drop downboxes).
I need to launch multiple windows with the same form with different data to speed up form filling
What kind of scripting/programming do I need to use to fulfill these needs(Batch, JS .. ) ?
I have knowledge only of java, and basic html,c,c++ ... so if I can get basic tutorials I would be grateful indeed.
I have bits of ideas of how this is possible - through IDs of various field on the page which I can access to edit their values, so I just need language specific tutorials/suggestions.
Batch would be preferable if possible, because i need to execute the script through a java swing program.
P.S : If this is of any relevance, only browser acceptable is IE
dont think its possible through Batch,
I think easiest would be javaScript for this task. (chill js is pretty easy)
You can write a simple javaScript to fill in form
You should find how to fill form through javaScript helpful
Then you can use ScriptEngineManager to execute javaScript from your java code.
This tutorial should be helpful :execute javascript from java
You can't fill HTML-fields with a Batch-File. The easiest way is to use Javascript an Greasemonkey in Mozilla Firefox. You can find Tutorials here.
An other way to send data to an WebServer is to use in C/C++/Java Sockets and the HTML-Protocol.

Joomla! system plugin to add extra params to all modules

I need to create a system plugin with one goal - add extra group fields of parameters to all module available.
There's one solution that I know of - into every XML manifest of every module add extra parameters, but this is bad solution for two reason:
1) It make impossible to update the modules without loosing these
changes
2) Its is lot of work
3) It makes extending of these
parameters almost impossible
What I want to do:
I want to make a systems plugin, that adds to every installed module a group of parameters.
What I am asking for:
I looked through the internet for a solution. I found out that I don't need to create new type of parameter. I want to use built-in type - text or list.
There is some tutorials, which have info about adding parameters to a single module and retrieving them for this single module helper.php. Yes, that's the thing I don't want too.
I asking for a link to bunch of tutorials or advice how to proceed further without tutorials.
this module is using what you are searching for. If you have time you may analise it and maybe you'll find answer.
Advanced module manager

How to extract labels from Symfony forms I18n Extract Task

I am quite aware that the extract task accepts application as a parameter, and thus one can't expect it too look into the forms folder.
However, I referred the link (below) and tried a couple of ways:
1. defining my proxy __() method
2. including the I18n helper in App Configuration
However, both aren't working.
Can anyone tell me how to extract these from the form classes?
Thanks
http://groups.google.com/group/symfony-devs/browse_thread/thread/1d034f5f7367fe0c
You need to use the i18n helper and add the translated strings manually to your XML/XLIFF files. The translations themselves work, it's just the i18n:extract task that doesn't look inside form classes so it has to be done manually. I hope they add this feature in Symfony 2.0.
See the first few paragraphs here: http://www.symfony-project.org/forms/1_4/en/08-Internationalisation-and-Localisation
There's a way to extract it altough it's not recommended by the developers:
In lib/i18n/extract/sfI18nApplicationExtract.class.php add:
$this->extractFromPhpFiles(sfConfig::get('sf_lib_dir').'/form');
to function extract()
In your form class's configure method add:
sfLoader::loadHelpers('I18N');
This way you can use the __() function in your form class.
I'm currently testing it. Will share my findings.

Developing a GUI Builder Application

I am looking for a nice framework for developing a GUI builder Application. We have an application where 100Os of custom data entry forms and their print formats are required and each client will need some modifications on these. We have a developed a product using java based open source templatnig frameworks so that the layout and field definition are stored in database and rendered dynamically to the user. We also have an appication to design these forms but cannot do visual design.
Now I am trying to make a Visual Form Designer application for generating these forms. Can any one suggest some open source frameworks than can be used? Can I use Eclipse Visual Editor? Or is it better to develop some kind of parser for HTML using AntLR and then parse the HTML output from already existing GUI builders like Dreamweaver to get the desired output?
Thanks and Regards,
-- Kannan
Oooh, great question!
I wouldn't know any readily availble framework that you can use. Depending on your needs however, I think rolling your own shouldn't be too hard.
First of all, you probably wouldn't want to give the users too much freedom. Freedom only gives them the opportunity to mess things up and make the resultant forms hard to use. I think from your description that the fields are pre-defined, so that the user only needs to customize which fields appear on a given form, and in what order. Order can be a simple thing like top-to-bottom. Some semi-intelligent automatic layouting could be used to conserve screen space. Adding a feature to group fields together would probably also be useful, and grouping would lead to some kind of standard "group" widget.
Accepting simplified functionality like this, you don't really need the flexibility of a full gui editor. A couple of listviews, maybe a property sheet and a preview window will be enough to give your users the functionality they need.
Of course, this only holds for screen forms. Print forms may be trickier to layout, as people may want to cram as many fields as possible into very little space so the entire form can fit on a single page or something. I really don't have any suggestions for you there, but maybe a similar "simplified" approach with some intelligent auto-layouting could work.
Overall, my advice would be: Keep It Simple! (S... ;)