ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> visualperl-discuss
visualperl-discuss
RE: [Visualperl-discuss] not importing namespace "System"
by Tom Humphrey other posts by this author
Apr 19 2005 9:13PM messages near this date
view in the new Beta List Site
RE: [Visualperl-discuss] not importing namespace "System" | FW: Re: [Visualperl-discuss] remote debugger gives error and 'use' is not working
Thanks for bearing with me, I found the source of my problems. When I 
installed the PDK pro pack it *did not* install plc.exe and perlNH.dll into 
c:\perl\bin.

What does the PDK pro pack .msi install? I am actually surprised that the 
installer did not "put" files into the correct folders!

Wouldn't it be a good idea to have the installer try and install necessary 
executables into default locations, and not leave it to the programmer who 
isn't sure of where things should go?

So with that said, I get another error when testing my hello world 
application in .NET (Visual Perl):

popup window with title bar:
Perl Debugging Host

and message:
The system cannot find the file specified.

That is all. program doesn't run after that. I have to close the debugger 
and shake my head.

I am having a less than good time getting hello world running. Is this 
typical? Any discussion on this? Why am I having to struggle so much? (I'll 
self deprecate myself thanky you)


Tom



----Original Message Follows----
From: "Tom Humphrey" <sapbucket@[...].com> 
Reply-To: Tom.Humphrey@[...].net
To: VisualPerl-discuss@[...].com
Subject: RE: [Visualperl-discuss] not importing namespace "System"
Date: Tue, 19 Apr 2005 20:18:34 -0700

Sorry to bother again, but where do I download PerlNET from? A quick look at 
activestate does not show a product called "PerlNET"...maybe it is named 
something else and I am being retard?

Thanks

Tom

pps:
I found this in the mailing lists:

On Fri, 4 Oct 2002 19:15:50 -0700, "Craig Dayton" <cadayton@[...].net> 
wrote:

> When building the basic generated Managed Exe from VS .Net, the line of 
> code 'use namespace
"System";' causes the error below to be generated.
> 
> 'Can't locate namespace.pm in @inc...'
> 
> I believe a couple of other people have experienced this same problem, but 
> it not clear fro
m the archive list on what the solution may be.
> 
> My quick workaround was to just use the fully qualified .Net Component 
> name, but it would b
e nice to know to get the 'use namespace' declaration to work.

This can happen if Visual Perl doesn't have the correct location for the
PerlNET "compiler" plc.exe, which is normally C:\Perl\bin.  If Visual Perl
doesn't find plc.exe, it uses perl.exe instead for syntax checking.  Since
"PerlNET" and "namespace" are not real Perl modules, but are generated by
PerlNET on the fly, you'll get syntax errors.

Cheers,
-Jan








----Original Message Follows----
From: "Tom Humphrey" <sapbucket@[...].com> 
Reply-To: Tom.Humphrey@[...].net
To: VisualPerl-discuss@[...].com
Subject: [Visualperl-discuss] not importing namespace "System"
Date: Tue, 19 Apr 2005 19:39:37 -0700


I've just installed VS.NET 2003 and Visual Perl. All defaults, no settings 
changed, everything installed in default directories.

I file-> new project->visual perl->managed .exe
i call it HelloWorld

The following code pops up in the code pane (solution loads fine etc.):

------------------------------------------------------
use strict;
use namespace "System";
use PerlNET qw(AUTOCALL);

Console-> WriteLine("Hello, World.\n");
-------------------------------------------------------


' use namespace "System"; ' is underlined red and throws a compilation 
error.

In the solution explorer i expand 'references' and see the System.dll is 
there, as it should be, the only dll automatically loaded.

Why am I getting this error? Please help! I am stuck at the mercy of this 
pathetic error; it is so basic that I cannot even figure out how to diagnose 
it.

Best Regards,

Tom Humphrey


_______________________________________________
VisualPerl-discuss mailing list
VisualPerl-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
VisualPerl-discuss mailing list
VisualPerl-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
VisualPerl-discuss mailing list
VisualPerl-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Tom Humphrey
Tom Humphrey
Tom Humphrey

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved