Bioperl: Possibly Off-topic: BoulderIO fails with CGI.pm
Lincoln Stein
lstein@cshl.org
Mon, 21 Jun 1999 08:48:21 -0400 (EDT)
Hi Sara,
Is something missing from the second example? I don't see a place
where you create the Boulder stream.
You should address your response directly to me. Boulder isn't part
of the bioperl mainstream, even though I wish it were!
Best,
Lincoln
sara yurman writes:
> I saw a BoulderIO announcement posted here, and so hope that it's okay
> to post a question about it. If not, please forgive the post. I have
> tried comp.lang.perl.misc and can't even get flamed.
>
> I'd like to use Boulder.pm with input from CGI.pm. Each works fine
> separately, but a call to new Boulder::Store gets ignored in a script
> with CGI.pm.
>
> When I run it in my localhost
> (http://localhost/cgi-bin/[scriptname].cgi), my error_log file returns
> the following message:
> Can't call method "write_record" on an undefined value at
> /home/httpd/cgi-bin/[scriptname].cgi line [whereever I tried to write
> the record].
>
>
> TIA,
>
> Sara
>
> *********************This works!******************************
> #!/usr/bin/perl
>
> use Stone;
> use Boulder::Store;
>
> my $stone = new Stone;
> $stone->insert(name=>'Sara');
> my $store=new Boulder::Store("boulder",true);
> print "\$store=".$store."\n";
> $store->write_record($stone);
>
>
> It prints the results nicely, and obediently writes out boulder.data and
> boulder.index.
>
> **************This gives the hated error message*******************
>
> #!/usr/bin/perl
>
> use CGI qw(:standard);
> use Stone;
> use Boulder::Store;
>
> print header;
> print start_html('A Simple Example'),
> h1('A Simple Example'),
> start_form,
> "What's your name? ",textfield('name'),
> submit,
> end_form,
> hr;
>
> print end_html;
>
> $stone prints nicely, but the attempt to print $store gives only
> "$store =". I was expecting something like HASH0x..... No
> boulder.data or boulder.index. And the httpd log complains
> as noted above.
>
> --
>
> Sara W. Yurman
> Spatial Focus, Inc.
>
> email: syurman@spatialfocus.com
> voice: (404) 378-0989
> fax: (209) 254-9531
> =========== Bioperl Project Mailing List Message Footer =======
> Project URL: http://bio.perl.org/
> For info about how to (un)subscribe, where messages are archived, etc:
> http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
> ====================================================================
--
========================================================================
Lincoln D. Stein Cold Spring Harbor Laboratory
lstein@cshl.org Cold Spring Harbor, NY
========================================================================
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================