2
<%@ Language="PERLSCRIPT" %>
<!---------------------------------------------------------------------------
#include VIRTUAL="/include/perl/widgetinclude.asp"
---------------------------------------------------------------------------->
<!---------------------------------------------------------------------------
#include VIRTUAL="/include/perl/path.asp"
---------------------------------------------------------------------------->
<!---------------------------------------------------------------------------
#include VIRTUAL="/include/perl/widgetpackages.asp"
---------------------------------------------------------------------------->
<!---------------------------------------------------------------------------
#include VIRTUAL="/include/perl/web.asp"
---------------------------------------------------------------------------->
<!---------------------------------------------------------------------------
#include VIRTUAL="/include/perl/eventlog.asp"
---------------------------------------------------------------------------->
<%

EVENTLOG::LogOpen();

%>
<!---------------------------------------------------------------------------
#include VIRTUAL="/oasiscs/include/perl/security.asp"
---------------------------------------------------------------------------->
<%
$Response->Redirect("/oasiscs/security.asp") unless    (SECURITY::SecurityCheck("oasiscs"));
%>
<!---------------------------------------------------------------------------
#include VIRTUAL="/include/perl/form.asp"
---------------------------------------------------------------------------->
<%
#----------------------------------------------------------------------------
#  Include service-specific custom packages.
#----------------------------------------------------------------------------
require "admin.pl"                     || die "Couldn't load admin.pl";
require "couponcodes.pl"               || die "Couldn't load couponcodes.pl"; 
require "customers.pl"                 || die "Couldn't load customers.pl";
require "newpcs.pl"                    || die "Couldn't load newpcs.pl";
require "orders.pl"                    || die "Couldn't load orders.pl";
require "pharmacy.pl"                  || die "Couldn't load pharmacy.pl";
require "stores.pl"                    || die "Couldn't load stores.pl";
require "website.pl"                   || die "Couldn't load website.pl";
%>
<HTML>
</HTML>

I need to profile an asp script that runs perl script. Any ideas how I could execute NYTprof in classic asp with perl script?

Above is the sample code (not complete)

Any help would be appreciated.

Thanks.

Rey Monta
  • 31
  • 3

1 Answers1

0

The following should work:

<%

use Devel::NYTProf;

EVENTLOG::LogOpen();

%>

Also, there is Win32::ASP::Profile; might be an alternative...

sferencik
  • 3,144
  • 1
  • 24
  • 36
  • Thanks, I will try your suggestions and get back to you ASAP. – Rey Monta Mar 27 '14 at 01:20
  • <%@ Language="PERLSCRIPT" %> Test Perl Script <% use Devel::NYTProf; EVENTLOG::LogOpen(); my $a=0; $Response->Write($a); %> Tried it in my local IIS and yields : Technical Information (for support personnel) Error Type: $Response->writeblock(0); use Devel::NYTProf; EVENTLOG::LogOpen(); my $a=0; $Response->Write($a); $Response->writeblock(1); (0x80004005) Internal Error /oasis_test/test_profile.asp – Rey Monta Mar 27 '14 at 05:47
  • Does your Perl (as running on the server) see the module? (Is your module installed in Perl/site/lib?) You may want to try to `require` the module (happens at run-time rather than compile-time). Does it work? Try doing it in an eval and die($@) after the eval. Debugging on IIS is hard; I usually just die() at the appropriate places to get the output. – sferencik Apr 04 '14 at 11:26