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 8:36PM messages near this date
view in the new Beta List Site
[Visualperl-discuss] not importing namespace "System" | RE: [Visualperl-discuss] not importing namespace "System"
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
Thread:
Tom Humphrey
Tom Humphrey
Tom Humphrey

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