CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
error on web page while using perl package

 



digioleg54
User

Oct 6, 2017, 6:15 AM

Post #1 of 4 (789 views)
error on web page while using perl package Can't Post

Hello all,

I have a package, where is a line

Code
our @EXPORT_OK = qw(monthly_rpts rpt_sect_i i_flds df_get_nm df_create df_read_ln);


sub df_create has a line

Code
 open(OUTF,">$df") or die "Failt to create $df"; 
($f_sth=$e_dbh->prepare($QRY_STR)) && ($f_sth->execute());


file is created, but has nothing inside.
However we get an error on web page, instead get something, it displays select query.
Could you please help me to understand where the error is coming from?

Thanks


Laurent_R
Veteran / Moderator

Oct 6, 2017, 8:08 AM

Post #2 of 4 (780 views)
Re: [digioleg54] error on web page while using perl package [In reply to] Can't Post

Do you expect something to be in this file? You don't seem to be writing anything to it, so I would expect this file to be created but to remain empty. Or did I miss something?


digioleg54
User

Oct 6, 2017, 8:24 AM

Post #3 of 4 (779 views)
Re: [Laurent_R] error on web page while using perl package [In reply to] Can't Post

The problem is not with the file. The problem is that in the package we have a line

Code
our @EXPORT_OK = qw(monthly_rpts rpt_sect_i i_flds df_get_nm df_create df_read_ln);


but I don't see any Perl script, which would use sun df_create . But when I go to web site with trade browser, instead see the real browser with data, I see the query (select ....) and at the end

Code
at /export/applications/dte/perl-lib/ReportTypes/ReportTypesI.pm line 220


this line is in sub df_create where we execute the query. And I don't understand, why this error is here
below is a line 220

Code
($f_sth=$e_dbh->prepare($QRY_STR)) && ($f_sth->execute());


thanks


Laurent_R
Veteran / Moderator

Oct 7, 2017, 3:07 PM

Post #4 of 4 (747 views)
Re: [digioleg54] error on web page while using perl package [In reply to] Can't Post

So your problem is, if I understand well, that you have an error on a code line within the df_create sub and that you don't think this sub is called. Is this correct?

Well, since the module you refer to is apparently not a CPAN or otherwise public module but something that you or your organization has created, it is very difficult for us to guess what's in it.

I am afraid we need much more information from you before we can start helping you.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives