In my Perl based server application, I want to execute a script in a new pop up window. I was using a syntax like:
var my_window = window.open('open_window.pl, 'my window', 'width=800,height=600,resizable,scrollbars');
When I run the program in FF and Chrome it all works fine. I can open my pop-up window with above parameters and can see my desired result but the issue starts when I do the same test with IE 8. In spite of pop-up blocker off, the pop-up window was not launching, it was giving me a error message like:
var my_window = window.open('open_window.pl, <strong><span style="color:#00ff00;">'my_window', 'width=800,height=600,resizable,scrollbars');
then it should works.
After doing this change it works with me for all the browsers.
I don’t know why IE always through such type of errors, even if you launch the in-built Developer tool from IE interface then also you will get the same error message ”Invalid arguments” no further clue/pointer to solve the issue. MS really has to improve the error handling messages to user.
So guys, be careful while developing pop-up window for all browsers specially for IE.
In Perl Node Interface blog I found a interesting entry on the methods to use Devel::Cover. If you want to check more on Perl Node Interface (PNI) see the detailed installation instructions on this link.
I am relatively new to Perl.. in fact not so new now it’s been almost 3 years but frankly I am still learning new things on daily basis so much to learn. Great language and community it’s privilege to be part of ! Prior to Perl I was programming in C/C++ for 3 years and before that I was programming mostly in C and assembly languages. So it’s been wonderful journey till now learning many languages. Well, as C++ was my last language before Perl so I sometime use my C++ OO concepts to understand the same OO concepts in Perl. I don’t know if this is the correct approach or not but for me it helps. Last weekend I was just thinking about static variables and static functions/methods in C++. Second obvious thought was how we implement them in Perl? or in fact do we really need them? As we don’t have private, public, protected keyword in Perl so how we are going to implement these features and setting the access inside and outside class? How Perl allocates the memory for static variable? Can we get this behavior just by declaring a variable outside of functions in a package or does const module will help?
So many questions, Well I might get some answers from web but I thought that it would be better idea to use this platform and ask directly to experts. Would be nice if you guys can help me to understand and also direct me to some documentation links which compare the OO features in C++ and Perl.
I found a very interesting and useful resource on slideshare which describes new OO system with Moose for Perl 5. See blow the full presentation. Author doug treder has used excellent examples and explained them nicely.
We in our project use HTMLDOC for PDF generation in Cent OS 5. We pass html files with some template info and run the HTMLDOC command line from perl program. This after multiple run gives me the correct PDF book with proper table of content, Index etc. The basic issue now I face with this engine is that it doesn’t support the new pdf features like PDF/A, CSS etc. and I don’t think HTMLDOC is very much in developmental mode. I want to introduce new engine to my application and tried some of the available options:
Looks fine also have the Perl wrapper for manipulating PDF but can’t run as a batch process for making single PDF from many HTML files. This can be done through Perl program by making a loop to documents which in result can produce combine PDF. Like prince it also has a licence fee.
First thing I like about this engine is that this is a open source engine, beside being free it still supports CSS. It can be run as a batch process through Perl like HTMLDOC, prince. At first look it looks promising to me so I have decided to invest some time on it. The engine is QT and webkit based and in development phase.
I was wondering if I am missing something. Is there other engines someone has tried which go well with Perl?
Since closures are subroutine references with a bit of private data thrown in, they are very convenient to use as callback procedures in graphical user interfaces. There is a nice example which explains the need of using closures. This commonly used approach is called “smart” callback procedure.