I have written a perl script which inturn calls or runs few perl modules.
My requirement is to use run the perl script with different switches or arguments
and asses the code coverage of both perl script and perl modules. I am using Devel::Cover module to collect metrics, but it collects only for the given perl script not for modules. Does anyone uses the Devel::Cover module to collect the coverage metrics for perl and its modules?...
User Profile
Collapse
-
How to collect code coverage of both perl scripts and modules
-
[CODE=perl]
use lib "your/Games.pm path/";
[/CODE]
will do that work.... -
use the dos command to find the version of the dll or exe file in the foreach loop
with the the perl system command or exec command.
[CODE=perl]
use strict;
use warnings;
use File::Find;
use File::Basename;
use File::Spec::Uni x;
my $top_dir = $ARGV[0];
my $dir_path = File::Spec->rel2abs($top_d ir);
my @file_list = ();
my @all_file = Get_Dirs_Files( $dir_path);...Leave a comment:
-
It has returned two dimensional array i.e an array with references to arrays.
so the value to be get from the array reference
[CODE=perl]
use strict;
use Win32::OLE qw(in with);
use Win32::OLE::Con st 'Microsoft Excel';
$Win32::OLE::Wa rn = 3; # die on errors...
my $Excel = Win32::OLE->GetActiveObjec t('Excel.Applic ation') || Win32::OLE->new('Excel.App lication',...Leave a comment:
-
manimarank replied to Error: Prototype mismatch: sub main::prompt ($;$) vs none at inc/Module/Install.pmin PerlHi,
It is look like You have probably defined a function named "prompt" elsewhere in your program, the install.pm module tries to export its function "prompt",Pe rl
reports a clash....Leave a comment:
-
Find out missing floating value in an array
Greetings to all!!!
Has someone help me the algorithm to find out the missing flatoing values in an array pls..
For example an array contains the value of 1.1 to 1.20 with the increment of 0.1 i.e (1.1,1.2,1.3 .... 1.20).
How do i find out if 1.15 is missing in the list???
provide me some algorithm pls..
regards,
Manimaran -
-
You have to use eval with scalar
for ex.
my $len = eval ( "scalar \@array${i}");
Regards,
Manimaran.KLeave a comment:
-
Hi,
You can use Spreadsheet::Pa rseExcel::SaveP arser module to change the existing excel sheet.
max rows and columns should be checked using
[CODE=perl]
$worksheet->{MaxRow}
$worksheet->{MaxCol}
[/CODE]
Regards,
Manimaran.KLeave a comment:
-
HI
you can use eval function like
[CODE=perl]
for (my $i = 0;$i < 5; $i++) {
eval ( "push \@array${i},\"\ $i\"" );
print "\@array${i } @array${i} \n";
}
[/CODE]
regards,
Manimaran.k...Leave a comment:
-
Hi Jeff,
Spreadsheet::Pa rseExcel and Spreadsheet::Wr iteExcel::SaveP arser module are used to Parse as well as edit the Excel Sheet.
But the problem is formulas exist in the Excel sheet got deleted while modifing the Excel file.
Regards,
MM...Leave a comment:
-
Preserve Formulas
Hi,
Good day to all !!!
Is there any module to preserve the formulas while editing the Excel files using perl?
Pls Help me.
Regards,
Mani -
Here is the sample code...
[CODE=perl]
#!/usr/local/bin/perl
use Tk;
use warnings;
use strict;
my $mw = new MainWindow;
my $ent = $mw->Entry()->pack();
my $button = $mw->Button(-text => "OK",-command =>\&push_button );
$button->pack();
MainLoop;
sub push_button {
$name = $ent->get();
$mw->messageBox(-type=>"yesnocan cel",-message=>"$name ");...Leave a comment:
-
Passing File Handles
Is it possible to pass the file handle from one module to the other module?
my sample code is
Test.pl
-----------
&create_top(*LO G_FILE);
Create_Top.pm
-----------------------
package Create_Top;
sub create_top {
local *LOG_FILE = $_[0];
print LOG_FILE " Test \n";
}
1;
but this code is not working, can anyone pls... -
-
rename the files
Hi all,
I want to rename the files using substitution method, for ex
i have list of files of test_001.c,test _002.c,test_003 .c etc
i need to modify the "test" to "test_src"
alpha$: ls -al | sed -e 's/test/test_src/g'
this is not working,can anybody suggest me the bug in the command pls.
Thxs,
manik -
Sorry, i have written wrongly.
This is my task
my Top Directory contain some directories(x,y ,z) and files(a,b,c)
each directory(x,y,z ) contain some files say a1,b1,c1 etc.
i need to delete all the directories(x,y ,z) without deleting the files(a,b,c)
any help?...Leave a comment:
-
delete directories
how do i delete the directories(hav ing some files) only without delete the files,
rmdir wont remove the directory if it contains some files.
can any help me pls.? -
reboot the system
how i do reboot the system automatically at the specifed time?
i am using windows XP OS,Can anyone pls help me?Leave a comment:
-
reboot the system
how to reboot the system automatically at the specified time ?.
can anyone pls help me?
No activity results to display
Show More
Leave a comment: