> I've installed activestate perl, the PDK and visual perl. > When i use this command.
> use namespace "System";
> it tells me that namespace.pm cannot be found.
I don't know anything about .NET (since I'm uninterested in non-portable and proprietary technology that merely reinvents the wheel), but I can tell you why this isn't working in Perl.
Firstly, what made you think this would work at all?
"use namespace" is a C++ declaration, not to be confused with Perl's "use" statement which performs a function analagous to Java's "import". You are telling Perl to import a module named "namespace". That explains the error that you get.
And I've never heard of a "System" module for Perl.
Perhaps you meant:
use System;
??
Now, when I do that, I get a "System.pm not found" of course, but perhaps there's a System module on this PerlNET thing. What are you really trying to do?
What is PerlNET anyway? I'm assuming it's not a re-implementation of Perl that runs on the CLI, as they couldn't even get something simple like Python working on that! Python.NET is as dead as a dodo, last I heard, and turned out just to be a marketing exercise, to make people think that the CLI would do what the JVM does so well already with Jython.
> > I've installed activestate perl, the PDK and visual perl. > > When i use this command.
> > use namespace "System";
> > it tells me that namespace.pm cannot be found.
> I don't know anything about .NET (since I'm uninterested in non-portable > and proprietary technology that merely reinvents the wheel), but I can > tell you why this isn't working in Perl.
> Firstly, what made you think this would work at all?
> "use namespace" is a C++ declaration, not to be confused with Perl's > "use" statement which performs a function analagous to Java's "import". > You are telling Perl to import a module named "namespace". That explains > the error that you get.
> And I've never heard of a "System" module for Perl.
> Perhaps you meant:
> use System;
> ??
> Now, when I do that, I get a "System.pm not found" of course, but > perhaps there's a System module on this PerlNET thing. What are you > really trying to do?
> What is PerlNET anyway? I'm assuming it's not a re-implementation of > Perl that runs on the CLI, as they couldn't even get something simple > like Python working on that! Python.NET is as dead as a dodo, last I > heard, and turned out just to be a marketing exercise, to make people > think that the CLI would do what the JVM does so well already with Jython.
> Regards, > Derek.
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
I don't know much about it apart from the hype, except it only runs on Windows. Since I only run sensible OSes that rules it out for me for the time being.
When it runs on a reasonable OS, and MS de-patent all the bits of it they have locked up, I'll become interested. Until then, I can only assume it's Microsoft's hateful reaction to their failure to destroy Java. By re-doing Java and locking everyone into their "solution".
> Activestate documentation made me believe this would work. > PerlNET is activestates implementation of Perl for .NET
So, have they implemented Perl on the CLI, or is this just using the existing Perl implementation through some kind of .NET interface so that ActiveState get some more buzzword compliance?
Have your considered Visual Basic? I gather it works with .NET just fine.
> Thankyou for the lesson, but im fully aware of what the use statement is > for.
Clearly not, if you expected "use namespace ..." to work. But, you just can't help some people!
> WARNING: Such venomous hatred towards Microsoft will only serve to give YOU > heartburn.
Why? I don't use their products at all. I just have silly people telling me I must use their poor software for no good reason.
And stating the facts is not hatred. Unless Python.NET has been raised from the dead, it is axiomatic that the JVM runs Python better than the CLI.
In a fit of excitement on Mon, 3 Mar 2003 14:46:53 -0000, "Jason Hood" <jasonh...@tiscali.co.uk> managed to scribble:
> WARNING: Such venomous hatred towards Microsoft will only serve to > give YOU heartburn.
Hah.
M$ is the root of all evil.. even moreso than money.. the sooner people learn this, the better.. and the progress that X is making, I can see more and more FreeBSD and Linucks desktops being used.
I saw a nice little sig:
Linux for Stability Mac for Creativity Windows for Solitaire
Unfortunatley, I forgot on what post I saw it, so apologies to the poster with this as part of their sig.
Windoze in general is a joke.. even my 6 year old prefers logging into a shell and using FreeBSD and VIM rather than having to mess around with various, pointless mouse clicks.
Still, my 2p worth.. not necessarily anyone elses =)
"Derek Thomson" <dthom...@NOSPAMusers.sf.net> wrote: > When it runs on a reasonable OS, and MS de-patent all the bits of it > they have locked up, I'll become interested. Until then, I can only > assume it's Microsoft's hateful reaction to their failure to destroy > Java. By re-doing Java and locking everyone into their "solution".
Ah, so you're one of these folks who believe that everything should open and that companies should be forced to open up all of their protocols no matter how much they spent developing them. Ah.
.net is actually Microsoft's solution to a problem they originally created, with the proliferation of numerous conflicting standards in Windows. .net allows software, programming languages, etc, to all work towards a single platform, rather than having to deal with various different standards to communicate with each other. It's a bit of a Java-esque scheme in principle, but .net covers a lot more ground.
Beyond that, I can't say too much, I don't develop for it.
> So, have they implemented Perl on the CLI, or is this just using the > existing Perl implementation through some kind of .NET interface so that > ActiveState get some more buzzword compliance?
> Have your considered Visual Basic? I gather it works with .NET just fine.
You can target .NET with any of Microsoft's latest programming tools. Interestingly this means Visual Basic is almost as powerful as VC++, as the apps produced by them end up running on the same libraries.. whether that's a good thing or not, I can't say.
> Why? I don't use their products at all. I just have silly people telling > me I must use their poor software for no good reason.
I don't think the original poster did that at all. They simply asked a question and you decided to use your answer as a platform to launch into a rant.
> And stating the facts is not hatred. Unless Python.NET has been raised > from the dead, it is axiomatic that the JVM runs Python better than the CLI.
No, but throwing in comments like "(since I'm uninterested in non-portable and proprietary technology that merely reinvents the wheel)" makes it look you were posting simply because you had an opinon to parade.
.NET is not a Microsoft only domain, by the way.. the Mono project to develop a .NET implementation for Linux is going extremely well -> http://www.go-mono.com/
While you might not like the company that created it, .NET is actually a pretty good idea, as in -principle- it should allow code running on a Microsoft server, say, to be easily ported to Linux, and vice versa.
Languages like Perl and Java have allowed this for some time, but .NET isn't a language, it's more like the JVM, but it covers a lot more ground and becomes a lot more integrated with the system. .NET heralds the second generation of moving towards a world where the OS doesn't actually matter, but the VM does.
Derek Thomson <dthom...@NOSPAMusers.sf.net> wrote: : Jason Hood wrote:
: > Hi, : > : > Im looking into PerlNET as a solution. : > : > I've installed activestate perl, the PDK and visual perl. : > When i use this command. : > : > use namespace "System"; : > : > it tells me that namespace.pm cannot be found. : : I don't know anything about .NET (since I'm uninterested in non-portable : and proprietary technology that merely reinvents the wheel), but I can : tell you why this isn't working in Perl.
By your own admission of unfamiliarity, you are making guesses.
: Firstly, what made you think this would work at all?
Because it is in lots of Activestate PDK sample code.
The use namespace "System"; pragma tells Perl to look up types in the System namespace.
: "use namespace" is a C++ declaration,
So?
It may be inferred that the pragma's name was chosen to make C++ programmers more comfortable, but it's valid Perl. All it needs is to find namespace.pm.
: You are telling Perl to import a module named "namespace". That explains : the error that you get.
The error is that namespace.pm cannot be found, not that the OP is trying to get Perl to run C++ code.
Reasonably, this pragma would be part of the Activestate PDK. Since it cannot be found, the PDK has been improperly installed.
The OP may wish to contact Activestate's support on this issue. They should be able to provide a solution to the difficulty with minimal guesswork and FUD.
: And I've never heard of a "System" module for Perl. : : Perhaps you meant: : : use System;
You are trying to intuit meanings that are not there.
: What is PerlNET anyway?
It stitches Perl into the .NET framework. Advocacy issues have no relevance to the OP's technical difficulty.
Alan J. Flavell wrote: > Looks like March is going to be a big-plonk month, based on the first > few days.
If asking a valid question related to Perl, if not the standard distribution, is considered 'plonk' in c.l.p.m, then I certainly look forward to seeing many more on-topic posts full of Microsoft bashing and FUD.
> The OP may wish to contact Activestate's support on this issue. They > should be able to provide a solution to the difficulty with minimal > guesswork and FUD.
Thanks fopr everyones comments, i've re-installed the PDK a couple of times with no joy, and have contacted activestate.
I'll post the response here in case anyone else has a similar problem.
Cheers,
Jason
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
> I've installed activestate perl, the PDK and visual perl. > When i use this command.
> use namespace "System";
> it tells me that namespace.pm cannot be found.
Why did you multipost to clp.moderated?
use namespace "System";
translates roughly to:
BEGIN { require "namespace.pm"; # which could be written as # require namespace namespace->import("System");
}
Perl looks for namespace.pm and can't find it. If the docs tell you it should work the docs are wrong. We don't have the docs, so we can't tell you.
I don't know the namespace module (the one on CPAN), but its rather unlikely that that's the one you are referring to, because then your usage would not make sense at all.
Maybe your installation is incomplete or you forgot to tell perl to look at the right places.
> In a fit of excitement on Mon, 3 Mar 2003 14:46:53 -0000, "Jason > Hood" <jasonh...@tiscali.co.uk> managed to scribble:
> > WARNING: Such venomous hatred towards Microsoft will only serve to > > give YOU heartburn.
> Hah.
> M$ is the root of all evil.. even moreso than money.. the sooner > people learn this, the better.. and the progress that X is making, I > can see more and more FreeBSD and Linucks desktops being used.
Yep, Adolf Hitler and his pals Idi Amin and Pol Pot, not to mention their predecessor throughout history, were just playing around. They weren't evil, because Bill G hadn't invented the whole concept yet...
Sheesh.
BTW, I don't care much for their corporate practice either, but I think you've gone a wee bit past the deep end up there.
> Which part of what you deleted represented "a valid question related > to Perl", please?
None, although the post you were commenting on was simply a rebuke to a pile of FUD, so one (possibly incorrectly) assumed you were also considering the poster's original post which did ask a valid question.
If I was incorrect with this assumption, I wonder why you chose to comment on the rebuke, rather than on the post containing the OT comments and FUD that kicked it off?
On Tue, 04 Mar 2003 00:36:05 +1000, Derek Thomson wrote: > Jason Hood wrote: > "use namespace" is a C++ declaration, not to be confused with Perl's > "use" statement which performs a function analagous to Java's "import". > You are telling Perl to import a module named "namespace". That explains > the error that you get.
Well, there's a namespace pragma on CPAN. It description also explains that the similarity to C++ isn't randomness:
NAME ^
namespace - Perl pragma to use like C++ namespace aliasing
SYNOPSIS ^
use namespace File => IO::File;
my $fh = new File "foo", O_CREAT|O_WRONLY; if( defined $fh ) { print $fh "bar\n"; $fh->close; }
DESCRIPTION ^
Allow aliasing namespace. May be useful for reusability increase.
[...]
> And I've never heard of a "System" module for Perl.
> Perhaps you meant:
> use System;
I also have never seen exactly a "System" module, but in CPAN there are a lot of similar called ones, like: Register::System System2 SystemC::* CPANPLUS::Internals::System and so on
Peter Cooper wrote: > "Derek Thomson" <dthom...@NOSPAMusers.sf.net> wrote:
>>When it runs on a reasonable OS, and MS de-patent all the bits of it >>they have locked up, I'll become interested. Until then, I can only >>assume it's Microsoft's hateful reaction to their failure to destroy >>Java. By re-doing Java and locking everyone into their "solution".
> Ah, so you're one of these folks who believe that everything should open and > that companies should be forced to open up all of their protocols no matter how > much they spent developing them. Ah.
That would heavily influence my choice, yes. I'd be an idiot to lock myself into a company that previously used predatory tactics to keep customers if I had any kind of choice.
> .net is actually Microsoft's solution to a problem they originally created,
Great. When are they going to fix the Windows file system?
>>Why? I don't use their products at all. I just have silly people telling >>me I must use their poor software for no good reason.
> I don't think the original poster did that at all. They simply asked a question > and you decided to use your answer as a platform to launch into a rant.
I decided to ask some questions regarding .NET. Big deal. Are people so sensitive these days? Sheesh!
> .NET is not a Microsoft only domain, by the way.. the Mono project to develop a > .NET implementation for Linux is going extremely well -> http://www.go-mono.com/
And they are really going to implement all of .NET? Even if (when) MS start deliberately making .NET not work with Mono? And then, MS will just pull the rug out from under them, by enforcing their existing patents on large chunks of .NET. The people working on Mono are extremely naive, to say the least.
> While you might not like the company that created it, .NET is actually a pretty > good idea, as in -principle- it should allow code running on a Microsoft server, > say, to be easily ported to Linux, and vice versa.
Doesn't Java? Doesn't Perl? And remember, this doesn't exist yet. It's only "in theory". I'll believe it when I see it.
> Languages like Perl and Java have allowed this for some time, but .NET isn't a > language, it's more like the JVM, but it covers a lot more ground and becomes a > lot more integrated with the system.
In what way exactly? All I know is, the JVM actually supports many languages, and the CLI supports, say, 3.
> .NET heralds the second generation of > moving towards a world where the OS doesn't actually matter, but the VM does.
Sounds like hype to me. Right now, you need to run it on Windows. Ugh. That's not really an option, as my standards are higher than that.
"Jason Hood" <jasonh...@tiscali.co.uk> wrote: >> > Im looking into PerlNET as a solution.
>> > I've installed activestate perl, the PDK and visual perl. >> > When i use this command.
>> > use namespace "System";
>> > it tells me that namespace.pm cannot be found.
You need to "compile" your PerlNET program using plc.exe, not run it with the normal perl.exe. The "namespace" pragma is created by plc.exe on the fly and doesn't really exist in the file system.
For questions about PerlNET I would recommend to visit the perl.net mailing list, even though it has been a little quiet recently:
"Derek Thomson" <dthom...@NOSPAMusers.sf.net> wrote: > That would heavily influence my choice, yes. I'd be an idiot to lock > myself into a company that previously used predatory tactics to keep > customers if I had any kind of choice.
There is a compelling argument here. But /should/ proprietary technologies be discouraged and avoided? Many would argue yes, but others see a benefit in a closed maintained system. The point here is that neither way is inherently bad or good, but they just have different advantages.
Of course, I agree that the 'value' of Microsofts offerings is not particularly high in regard to the cost ;-) But in some scenarios, Microsoft makes sense.
> Great. When are they going to fix the Windows file system?
Is something wrong with NTFS?
> I decided to ask some questions regarding .NET. Big deal. Are people so > sensitive these days? Sheesh!
No, but since none of the usual 'you're offtopic' netcops jumped in on this one, I thought I'd stick my hand up, and stress that Microsoft bashing is not what this group is all about. We're meant to be open minded, darn it, after all.. we use Perl ;-)
> And they are really going to implement all of .NET? Even if (when) MS > start deliberately making .NET not work with Mono?
Actually, ASP has been implemented pretty well on Linux for some time, and we haven't witnessed a similar clamp down with that.
> And then, MS will > just pull the rug out from under them, by enforcing their existing > patents on large chunks of .NET.
That is actually one concern surrounding the project at the moment.
> The people working on Mono are > extremely naive, to say the least.
That's like saying the MySQL team are naive, because they chose to replicate a previous closed off technology. Now more people code to the MySQL standards than the 'actual' ones.
> > Languages like Perl and Java have allowed this for some time, but .NET isn't a > > language, it's more like the JVM, but it covers a lot more ground and becomes a > > lot more integrated with the system.
> In what way exactly?
.Net, for better or worse, works at a lower level than the JVM. While it's reasonably 'easy' to port the JVM from system to system, .Net is more integrated with the system, and therefore a lot more libraries have to be written to 'port' it (although direct porting is impossible due to the closed source - which is why Mono is taking a while - but it's mostly there!).
> All I know is, the JVM actually supports many > languages, and the CLI supports, say, 3.
The question isn't one of support, it's just that no more languages have been written at this point. .Net supports at least Fortran, C++, Perl (if this PerlNET actually exists), VB, C#, and ASP at this point. And one could harp on all day about the ineffectiveness of the JVM. Sloooow.
> Of course, I agree that the 'value' of Microsofts offerings is not particularly > high in regard to the cost ;-) But in some scenarios, Microsoft makes sense.
...
> I thought I'd stick my hand up, and stress that Microsoft bashing is not what > this group is all about. We're meant to be open minded, darn it, after all.. we > use Perl ;-)
Lets face it nobody thinks that microsoft gets it right all of the time, but then nobody does.
Microsoft is in the business of making a profit but they are also committed to technology. Some things belong in the public domain, somethings don't.
Turn the other cheek, just because they strive to make things incompatible doesn't mean we have to. When you respond to questions by ranting at microsoft you appear to everyone like the guy standing outside mcdonalds condeming them as the spawn of satan.... <crazy>
> written at this point. .Net supports at least Fortran, C++, Perl (if this > PerlNET actually exists), VB, C#, and ASP at this point. And one could
harp on
PerlNET does exist and can be seen at www.activestate.com which is the home of the win version of perl. It stills needs work but it's a step in an admirable direction, especially if mono comes off.
Jason
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003