Re: /usr/bin/ls: 0403-027 The parameter list is too long

2005-05-24 Thread Steven Lembark



-- Vamsi_Doddapaneni <[EMAIL PROTECTED]>


Hi all,

Thanks for your help.

I am facing a new problem.

Here is the code part:
 foreach $name(`ls $opt_i/*.xml`){
chomp;
push @f, $name;
print "pushing elements=$name\n";
}
[EMAIL PROTECTED];

Now in the directory $opt_i if there are some 10 , 20 or even 100 its
working  well. But now I have some 305 odd xmls and the code is EXITING
WITH


sh: /usr/bin/ls: 0403-027 The parameter list is too long.


In unix prompt ls *.xml is working (giving out those 305 xmls)

Could anybody help me out?


This has nothing to do with DBI.

Try File::Find and iterate them.


--
Steven Lembark   85-09 90th Street
Workhorse ComputingWoodhaven, NY 11421
[EMAIL PROTECTED] 1 888 359 3508


Reg. perl module installation

2005-05-24 Thread shanthi nagarajan
Dear Friend,
I am shnathi Nagarajan working as a computer operator in Bioinformatics centre, 
Pondicherry University, India. Presently I am trying to connect perl and mysql. 
I have downloaded DBI-1.25.tar module and extracted into perl\lib\DBI-1.25. And 
also ran the makefile.pl  it was creating different file with extension .t, 
.pm, .h, .pl. after that while running test.pl file with perl test.pl command 
The output is 
DBI test application $Revision:  11.5 $
Cannot find blib even in D:/perl/lib/DBI-1.25/../../..
BEGIN failed—compilation aborted at line 21.

Please help me to overcome this problem. I will be grateful if u help me. 
What is the general procedure to connect perl and MySQL and how to get it 
through CGI (HTML)? 
Thanking you


Shanthi N.
Bioinformatics - Computer operator,
Bioinformatics centre, Pondicherry University,
R.Venkataraman Nagar, Kalapet, 
Pondicherry - 605 014, India. 
+91-413-2655212 , 0413-2655991-524
Fax: +91-413-2655211

-- 
___
Check out the latest SMS services @ http://www.linuxmail.org
This allows you to send and receive SMS through your mailbox.

Powered by Outblaze


Re: Reg. perl module installation

2005-05-24 Thread Matthew Persico
On 5/24/05, shanthi nagarajan <[EMAIL PROTECTED]> wrote:
> Dear Friend,
> I am shnathi Nagarajan working as a computer operator in Bioinformatics 
> centre, Pondicherry University, India. Presently I am trying to connect perl 
> and mysql. I have downloaded DBI-1.25.tar module and extracted into 
> perl\lib\DBI-1.25. And also ran the makefile.pl  it was creating different 
> file with extension .t, .pm, .h, .pl. after that while running test.pl file 
> with perl test.pl command
> The output is
> DBI test application $Revision:  11.5 $
> Cannot find blib even in D:/perl/lib/DBI-1.25/../../..
> BEGIN failed—compilation aborted at line 21.
> 
> Please help me to overcome this problem. I will be grateful if u help me.
> What is the general procedure to connect perl and MySQL and how to get it 
> through CGI (HTML)?
> Thanking you
> 

1) What version of perl are you using? Execute the command perl -V and
see what it says.

2) DBI-1.25 is a very old version of the module. 
See http://search.cpan.org and install the latest version of the
module before you continue your tests.

-- 
Matthew O. Persico


Re: DBI->disconnect is not a DBI method. Read the DBI manual. at ff.pl line 224

2005-05-24 Thread Matthew Persico
Pardon the top-posting, but I'd rather get the answer up front instead
of buried deep in the chain.

Turns out I was wrong - I got my test scripts crossed. Removing the ()
did not fix the problem.

However, it did make me think a little and once I got into the
debugger, I figured out what really happened. The subclassed module
does not do subclassing properly - it takes the result of a
DBI->connect and just reblesses it. I guess its a minor miracle that
anything works at all.

I got the disconnect to work by doing a

bless($dbh,"DBI::db");

just before the disconnect.

So, we are going to add a disconnect method to the subclass class that
does just that. It's ugly and kludgy, but going back and rewriting
MDISS::DB properly would require cycles that we just don't have.

On 5/23/05, Matthew Persico <[EMAIL PROTECTED]> wrote:
> On 5/23/05, Matthew Persico <[EMAIL PROTECTED]> wrote:
> > On 5/23/05, Hemanth Kumar <[EMAIL PROTECTED]> wrote:
> > > What happens when you replace $dbh->disconnect(); with $dbh->disconnect;
> > >
> > > hth
> > > Hemanth
> > >
> >
> > Son-of-a-monkey's-uncle, that worked!
> >
> > Okay, now I'm lost. Does anyone want to explain this behavior? The
> > best that I can come up with is that:
> > 1) there is some deep magic in DBI
> > 2) the () changes the signature of the disconnect call in such a way
> > that it does not match the prototype given in DBI and that since
> > MDISS::DB is a subclass of DBI and not a DBI, we've confused perl in a
> > bizzare way.
> 
> 3) The () force a lookup for a function. Without the parens, the
> lookup is free to find the function reference which points to the
> implementation in the appropriate DBD?
> 
> > >
> > > -Original Message-
> > > From: Matthew Persico [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, May 23, 2005 10:27 AM
> > > To: dbi-users@perl.org
> > > Subject: Re: DBI->disconnect is not a DBI method. Read the DBI manual.
> > > at ff.pl line 224
> > >
> > > On 5/20/05, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > > On Fri, May 20, 2005 at 10:08:36AM -0400, Matthew Persico wrote:
> > > > > Has anyone ever seen this message? I have a valid handle - all of my
> > >
> > > > > database commands work. The command is simply
> > > > >
> > > > > $dbh->disconnect();
> > > >
> > > > I'd guess that $dbh contains the string "DBI".
> > > >
> > > > Tim.
> > > >
> > >
> > > That was a rather sparse message I posted Friday. A few more details are
> > > in order. If anyone has any ideas after reading this, thanks in advance.
> > >
> > > Perl 5.6.1
> > > DBI 1.37
> > > DBD::Sybase 1.00
> > >
> > > Yes, I am stuck with these versions (esp. Perl) for the foreseable
> > > future.
> > >
> > > The connection is created in a module I have inherited (consultant long
> > > gone...) called MDISS::DB that contains, among other things, this
> > > code:
> > >
> > > BEGIN { # setup as a subclass of DBI
> > > @MDISS2::DB::EXPORT = (@DBI::EXPORT);
> > > @MDISS2::DB::EXPORT_OK = (@DBI::EXPORT_OK);
> > > @MDISS2::DB::EXPORT_TAGS = (@DBI::EXPORT_TAGS);
> > > @MDISS2::DB::ISA = qw(DBI DBI::db Exporter);
> > > @MDISS2::DB::db::ISA = qw(DBI::db MDISS2::DB Exporter);
> > > @MDISS2::DB::st::ISA = qw(DBI::st MDISS2::DB Exporter);
> > > DBI::init_rootclass('MDISS2::DB');
> > > }
> > >
> > > and this code:
> > >
> > > sub new {
> > >
> > > my %args = ();
> > > my $proto = undef;
> > >
> > > if (scalar(@_)) {
> > > ($proto, %args) = @_;
> > > }
> > >
> > > my %clone = ();
> > > my $class = undef;
> > > my $self = undef;
> > > my $private = undef;
> > > my %login = ();
> > > my $n = undef;
> > >
> > > $n = 'MDISS2::DB->new()';
> > >
> > > =item   legacy code
> > >
> > > my($proto, %args, %clone, $class, $self, $private, %login, $n) = @_;
> > >
> > > =cut
> > >
> > > %clone = ();
> > > if(ref($proto)) {
> > > if($proto->can('_private')) {
> > > $private = $proto->_private();
> > > if(exists($private->{'login'})) {
> > > %clone = %{$private->{'login'}};
> > > if(exists($clone{'driver'}) &&
> > > exists($args{'driver'})) {
> > > croak("$n - cannot clone
> > > '$args{'driver'}' from '$clone{'driver'}'")
> > >
> > > unless(uc($args{'driver'}) eq uc($clone{'driver'}));
> > > }
> > > }
> > > }
> > > } #endif
> > >
> > >
> > > $args{'driver'} = ucfirst(lc($args{'driver'})) || 'Sybase';
> > > if($args{'driver'} eq 'Oracle') {
> > > %login = mdiss_oracle_login(%clone, %args);
> > > } else {
> > > %login = mdiss_sybase_login(%args);
> > > }
> > > # print Dumper(%login);
> > >
> > > ### This connectDBI is a 

Re: Reg. perl module installation

2005-05-24 Thread Michael A Chase

On 05/24/2005 06:40 AM, shanthi nagarajan said:


Dear Friend, I am shnathi Nagarajan working as a computer operator in
Bioinformatics centre, Pondicherry University, India. Presently I am
trying to connect perl and mysql. I have downloaded DBI-1.25.tar
module and extracted into perl\lib\DBI-1.25. And also ran the
makefile.pl  it was creating different file with extension .t, .pm,
.h, .pl. after that while running test.pl file with perl test.pl 
command


It is not a good idea to extract the source archive for any Perl module
in the perl tree.  Read the README file that came in the archive.

--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.