[29469] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 713 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 3 00:14:19 2007

Date: Thu, 2 Aug 2007 21:14:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 2 Aug 2007     Volume: 11 Number: 713

Today's topics:
        Windows based perl editor? <bill@ts1000.us>
    Re: Windows based perl editor? sln@netherlands.co
    Re: Windows based perl editor? <1usa@llenroc.ude.invalid>
    Re: Windows based perl editor? <olson_ord@yahoo.it>
    Re: Windows based perl editor? <shawnhcorey@magma.ca>
    Re: Windows based perl editor? <shawnhcorey@magma.ca>
    Re: Windows based perl editor? <shawnhcorey@magma.ca>
    Re: Windows based perl editor? <1usa@llenroc.ude.invalid>
    Re: XML Validation <tadmc@seesig.invalid>
    Re: XML Validation <spamtrap@dot-app.org>
    Re: XML Validation sln@netherlands.co
    Re: XML Validation sln@netherlands.co
    Re: XML Validation sln@netherlands.co
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 02 Aug 2007 19:28:36 -0700
From:  Bill H <bill@ts1000.us>
Subject: Windows based perl editor?
Message-Id: <1186108116.062326.177760@d55g2000hsg.googlegroups.com>

I have been using Edit (in a dos box) on Windows for editing perl for
the past 8 years or so, and though it is fine for me, I think it is
time to step up to a windows based editor. Can anyone recommend a good
windows based perl editor?

My wish list for what the editor would be able to do is:

1. Allow me to run the program I am editting in a dos box (using
active state perl)
2. Have multiple undos
3. Create multiple back up files as I save changes (a form of version
control so I can step back to a previous "version" if what I did
doesnt work right).
4. Syntax hilighting
5. Multiple programs open at the same time
6. Some form of project structure to allow me to group all the files
together

Most of these "wishes" come from the MS Visual C++ editor I used to
use before discovering perl.

Searching the internet I came across Perl Express (http://perl-
editor.perl-express.com/) but am leary of downloading programs I find
on the internet without knowing if they are safe.

I am not sure if this would influence your recommendtions but the
majority (99%) of the perl I write is used on web servers.

Any / all suggestions are appreciated.
Bill H



------------------------------

Date: Thu, 02 Aug 2007 19:36:43 -0700
From: sln@netherlands.co
Subject: Re: Windows based perl editor?
Message-Id: <o355b3121cuv5ci3ige293gqujjn0ld2v1@4ax.com>

On Thu, 02 Aug 2007 19:28:36 -0700, Bill H <bill@ts1000.us> wrote:

>I have been using Edit (in a dos box) on Windows for editing perl for
>the past 8 years or so, and though it is fine for me, I think it is
>time to step up to a windows based editor. Can anyone recommend a good
>windows based perl editor?
>
>My wish list for what the editor would be able to do is:
>
>1. Allow me to run the program I am editting in a dos box (using
>active state perl)
>2. Have multiple undos
>3. Create multiple back up files as I save changes (a form of version
>control so I can step back to a previous "version" if what I did
>doesnt work right).
>4. Syntax hilighting
>5. Multiple programs open at the same time
>6. Some form of project structure to allow me to group all the files
>together
>
>Most of these "wishes" come from the MS Visual C++ editor I used to
>use before discovering perl.
>
>Searching the internet I came across Perl Express (http://perl-
>editor.perl-express.com/) but am leary of downloading programs I find
>on the internet without knowing if they are safe.
>
>I am not sure if this would influence your recommendtions but the
>majority (99%) of the perl I write is used on web servers.
>
>Any / all suggestions are appreciated.
>Bill H

Ultra-Edit32 is your best bet, it won't do most of what you wan't but
you can see closures. Plus the colors are nice if your on drugs.

Sln


------------------------------

Date: Fri, 03 Aug 2007 02:54:13 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Windows based perl editor?
Message-Id: <Xns9980E904BCB95asu1cornelledu@127.0.0.1>

Bill H <bill@ts1000.us> wrote in news:1186108116.062326.177760
@d55g2000hsg.googlegroups.com:

> I have been using Edit (in a dos box) on Windows for editing perl for
> the past 8 years or so, and though it is fine for me, I think it is
> time to step up to a windows based editor. Can anyone recommend a good
> windows based perl editor?


I have been using GVim for a quite a while now (http://www.vim.org/)

I don't use it but there is also a Perl specific add-in.

> 1. Allow me to run the program I am editting in a dos box (using
> active state perl)

check

> 2. Have multiple undos

check

> 3. Create multiple back up files as I save changes (a form of version
> control so I can step back to a previous "version" if what I did
> doesnt work right).

I don't know about multiple backups but probably can be set up.

> 4. Syntax hilighting

check

> 5. Multiple programs open at the same time

I am not sure what you mean by this.


> 6. Some form of project structure to allow me to group all the files
> together

Look up sessions.

For help with Vim, comp.editors is a good source.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



------------------------------

Date: Thu, 02 Aug 2007 20:06:14 -0700
From:  "O. Olson" <olson_ord@yahoo.it>
Subject: Re: Windows based perl editor?
Message-Id: <1186110374.491400.66120@k79g2000hse.googlegroups.com>

If you use Eclipse you can consider the Eclipse Perl Integration
http://e-p-i-c.sourceforge.net/ .

I use this under Windows. I think that it has many/all of your
requirements. (I have personally not tried version control and
debugging as yet.)

O.O.



------------------------------

Date: Thu, 02 Aug 2007 23:19:26 -0400
From: "Mr. Shawn H. Corey" <shawnhcorey@magma.ca>
Subject: Re: Windows based perl editor?
Message-Id: <46B29EBE.8010501@magma.ca>

A. Sinan Unur wrote:
>> 5. Multiple programs open at the same time
> 
> I am not sure what you mean by this.

Yes.  GViM can open multiple files (or the same file) in multiple panes, above, below, to the right or left.  And controls to rearrange them.


-- 
Just my 0.00000002 million dollars worth,
  Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle


------------------------------

Date: Thu, 02 Aug 2007 23:20:28 -0400
From: "Mr. Shawn H. Corey" <shawnhcorey@magma.ca>
Subject: Re: Windows based perl editor?
Message-Id: <46B29EFC.6070609@magma.ca>

A. Sinan Unur wrote:
>> 5. Multiple programs open at the same time
> 
> I am not sure what you mean by this.

Yes.  GViM can open multiple files (or the same file) in multiple panes, above, below, to the right or left.  And controls to rearrange them.


-- 
Just my 0.00000002 million dollars worth,
  Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle


------------------------------

Date: Thu, 02 Aug 2007 23:20:38 -0400
From: "Mr. Shawn H. Corey" <shawnhcorey@magma.ca>
Subject: Re: Windows based perl editor?
Message-Id: <be3fc$46b29f74$d1d94f53$5714@PRIMUS.CA>

A. Sinan Unur wrote:
>> 5. Multiple programs open at the same time
> 
> I am not sure what you mean by this.

Yes.  GViM can open multiple files (or the same file) in multiple panes, above, below, to the right or left.  And controls to rearrange them.


-- 
Just my 0.00000002 million dollars worth,
  Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle


------------------------------

Date: Fri, 03 Aug 2007 03:28:49 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Windows based perl editor?
Message-Id: <Xns9980EEE24CFB9asu1cornelledu@127.0.0.1>

"Mr. Shawn H. Corey" <shawnhcorey@magma.ca> wrote in
news:46B29EBE.8010501@magma.ca: 

> A. Sinan Unur wrote:
>>> 5. Multiple programs open at the same time
>> 
>> I am not sure what you mean by this.
> 
> Yes.  GViM can open multiple files (or the same file) in multiple
> panes, above, below, to the right or left.  And controls to rearrange
> them. 
> 

Mr. Corey: I am not sure why this needed to be posted three times.

In any case, of course, GVim can open multiple files at the same time. 
However, the OP said "multiple programs". Given the fact that he has been 
using EDIT all these years, I was not, and still am not, sure if he was 
thinking of something else.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



------------------------------

Date: Thu, 2 Aug 2007 17:33:47 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: XML Validation
Message-Id: <slrnfb4mub.4o7.tadmc@tadmc30.sbcglobal.net>

J. Gleixner <glex_no-spam@qwest-spam-no.invalid> wrote:
> sln@netherlands.co wrote:


>> One of them is available here, RxParse, a pure Perl xml,xhtml parser
>> that is excellent for that.

> Please, don't even suggest people use that module.  


I expect that sln is the author of that module.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


------------------------------

Date: Thu, 02 Aug 2007 20:49:49 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: XML Validation
Message-Id: <m2643x5tn6.fsf@dot-app.org>

sln@netherlands.co writes:

> One of them is available here, RxParse, a pure Perl xml,xhtml parser
> that is excellent for that. Search the forum or google. I think the
> one posted was version 1.1

The only thing Robic0's module is good for is to serve as a bad example.
Go ahead and search Google Groups for it though - you'll find out what's
wrong with it quickly enough.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Thu, 02 Aug 2007 18:49:21 -0700
From: sln@netherlands.co
Subject: Re: XML Validation
Message-Id: <eq15b35f9f45qh11b7s5dhlkpq75qrbv2b@4ax.com>

On Wed, 01 Aug 2007 22:05:42 -0700, sln@netherlands.co wrote:

>On Wed, 25 Jul 2007 14:56:36 -0700, Shiraz <shirazk@gmail.com> wrote:
>
>>I am trying to use the XML simple to parse out some xml data. If I use
>>the code below with invalid xml, i just get a warning 'not well-formed
>>(invalid token) at line 1, column 16, byte 16 at /usr/local/lib/perl5/
>>site_perl/5.8.7/i686-linux/XML/Parser.pm line 187'
>>A test like 'unless (my $data = $xml->XMLin($msg)  ) ' doesnt work
>>either.
>>Anyone know how to test for valid XML using just XML::Simple or would
>>i have to get a XML checking library
>>
>>Thanks,
>>
>>code:
>>#!/usr/bin/perl
>>use strict;
>>use XML::Simple;
>>$|=1;
>>my $xml = new XML::Simple;
>>my $msg =  '<xml><select app>orig_gw</select></xml>'; #this is bad xml
>>my $data = $xml->XMLin($msg)
>>
>>result:
>>not well-formed (invalid token) at line 1, column 16, byte 16 at /usr/
>>local/lib/perl5/site_perl/5.8.7/i686-linux/XML/Parser.pm line 187
>
>You have kind of a funny question. Seams like your asking how can I get more
>info on what the error is and how to fix it. Then it seams like your asking,
>how can I see the error without exiting my parsing, and continue parsing.
>
>The fact is, xml simple uses a parser that does syntax checking, a check
>for valid xml structure. Guess what, once xml becomes the "invalid" state,
>you can only recover the remaining xml in a cursorary way. Ie: anything
>(not everything) you get after that, has a validity problem, do you 
>understand?
>
>Most people use xml simple in one of two ways. You pre-parse the xml to
>the point until you start to capture raw xml to a buffer. You then pass
>the buffer to xml simple where it then puts it into an already known
>hash structure, usable by your program.
>
>The other way is to pass the whole xml file to xml simple to but
>into a gigantic unwiedly/unknown multi-level hash array, where you
>later itterate through it to the point where you think you have a
>known structure.
>
>Either way, you get zero out of any parser with invalid xml.
>Parsers aren't forgiving, nor are the xml simples that use them.
>"I don't wan't my program creating hash array garbage, making it
>look bad, and blaming me" kind of attitude.
>
>Of course an eval() around the access could trap that, for the most
>part you should expect nothing but perfect xml structure, if you 
>intend to parse it for data. You should know your source.
>
>You may want to use some locally available xml parse that actually
>gives you much more detail on invalid xml, like what node is missing,
>where, why and how, and also is tollerant to errors, and internally
>self-corrects them to parse the entire xml, and give you an overall
>evaluation.
>
>One of them is available here, RxParse, a pure Perl xml,xhtml parser
>that is excellent for that. Search the forum or google. I think the
>one posted was version 1.1
>
>good luck

Here is some output from RxParse 1.1.
It easily identified the fact that you cannot specify 
an "element-attribute" without a value for the attribute.
And that value must be in single or double quotes.
Most SAX Parsers give you a general and trivial error at a line/col.
RxParse goes the extra mile, in this case the "malformed element? '<select app>orig_gw'".
Its too easy to diagnose.

Btw, you should at least visit the W3C site to view the 1.1 form.
http://www.w3.org/TR/xml11/#NT-PITarget

Sln

Here is the RxParse header:
#################################################################
# AUTHOR: robic0, copyright (c) 2006-2007
# Reproduction of contents, or distribution in a comercial
# product, is strictly prohibited without prior written
# permission from the author.
#################################################################
# XML/Xhtml/Html - RXParse parse/edit/filter module
# ------------------------------------------------------
# Compliant w3c XML: 1.1 
# Resources:
#   Extensible Markup Language (XML) 1.1
#   W3C Recommendation 04 February 2004,
#   15 April 2004
#   http://www.w3.org/TR/xml11/#NT-PITarget
#################################################################

// --------------
// YOURS BAD
// --------------
some.xml:
<xml><select app>orig_gw</select></xml>

C:\>perl rptest.pl some.xml

new parse _: SCALAR ref (some.xml)
--------------------
start _:  xml
--------------------
rp_error_01, mark-up or reserved characters in content (line 1, col 24), malform
ed element? '<select app>orig_gw'
char  _:  <select app>orig_gw
--------------------
rp_error_05, expected closing tag '/xml' (line 1, col 33)
end   _: /select
--------------------
rp_error_04, missing start tag for '/xml' (line 1, col 39)
end   _: /xml
the code took:0.0283201 wallclock secs ( 0.03 usr +  0.00 sys =  0.03 CPU)
C:>
==========================================

// --------------
// YOURS FIXED
// --------------
some_modified.xml:
<xml><select app='MS Word'>orig_gw</select></xml>

C:\>perl rptest.pl some_modified.xml

new parse _: SCALAR ref (some_modified.xml)
--------------------
start _:  xml
--------------------
start _:  select
            app = MS Word
--------------------
char  _:  orig_gw
--------------------
end   _: /select
--------------------
end   _: /xml
the code took:0.034745 wallclock secs ( 0.03 usr +  0.00 sys =  0.03 CPU)
C:>
==============================================

// ------------------------------------------
// YOURS FIXED WITH PROPER XML DECLARATION 
// ------------------------------------------
some_modified_proper.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<select app='MS Word'>orig_gw</select>

C:\>perl rptest.pl some_modified_proper.xml

new parse _: SCALAR ref (some_modified_proper.xml)
--------------------
xmldecl_h _:  version = 1.0
              encoding = ISO-8859-1
--------------------
char  _:

--------------------
start _:  select
            app = MS Word
--------------------
char  _:  orig_gw
--------------------
end   _: /select
the code took:0.0341601 wallclock secs ( 0.03 usr +  0.00 sys =  0.03 CPU)
C:>





------------------------------

Date: Thu, 02 Aug 2007 19:13:10 -0700
From: sln@netherlands.co
Subject: Re: XML Validation
Message-Id: <8c35b31tc4t4euakvogmc08j5vr0iihv8j@4ax.com>

On Thu, 02 Aug 2007 10:31:40 -0500, "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:

>sln@netherlands.co wrote:
>> On Wed, 25 Jul 2007 14:56:36 -0700, Shiraz <shirazk@gmail.com> wrote:
>> 
>>> I am trying to use the XML simple to parse out some xml data. If I use
>>> the code below with invalid xml, i just get a warning 'not well-formed
>>> (invalid token) at line 1, column 16, byte 16 at /usr/local/lib/perl5/
>>> site_perl/5.8.7/i686-linux/XML/Parser.pm line 187'
>>> A test like 'unless (my $data = $xml->XMLin($msg)  ) ' doesnt work
>>> either.
>>> Anyone know how to test for valid XML using just XML::Simple or would
>>> i have to get a XML checking library
>
>That is telling you it's invalid.
>
>use XML::Simple;
>use strict;
>
>my $msg = '<xml><select app>orig_gw</select></xml>';
>my $data;
>eval {
>	my $xs = XML::Simple->new();
>	$data = $xs->XMLin( $msg );
>};
>print "Error: $@\n$msg\n";
>
>>>
>>> Thanks,
>>>
>>> code:
>>> #!/usr/bin/perl
>>> use strict;
>>> use XML::Simple;
>>> $|=1;
>>> my $xml = new XML::Simple;
>>> my $msg =  '<xml><select app>orig_gw</select></xml>'; #this is bad xml
>>> my $data = $xml->XMLin($msg)
>>>
>>> result:
>>> not well-formed (invalid token) at line 1, column 16, byte 16 at /usr/
>>> local/lib/perl5/site_perl/5.8.7/i686-linux/XML/Parser.pm line 187
>
>There's something not right on the first line, column 16.  You have to
>figure out what's not correct.
>
>[...]
>> One of them is available here, RxParse, a pure Perl xml,xhtml parser
>> that is excellent for that. Search the forum or google. I think the
>> one posted was version 1.1
>
>Please, don't even suggest people use that module.  Search the newsgroup
>to see why.
>
>Use something more reliable, like XML::Validator::Schema, if you have
>an XSD.

Validation only works on the contents of well formed XML.
"<xml><select app>orig_gw</select></xml>" is not valid and has a single element.

I think that you are not even aware of xml is quite evident.
To suggest to a poster with a problem, that the person who gave the only good
advice, is wrong about recommending a particular solution, is quite out of line.

I find your remarks insulting and not worth seeing you again!
Have a nice posting experience.

*plonk*

Sln



------------------------------

Date: Thu, 02 Aug 2007 20:07:16 -0700
From: sln@netherlands.co
Subject: Re: XML Validation
Message-Id: <af55b3dvr98imi8blglb7tte33srbomcae@4ax.com>

On Thu, 02 Aug 2007 20:49:49 -0400, Sherm Pendley <spamtrap@dot-app.org> wrote:

>sln@netherlands.co writes:
>
>> One of them is available here, RxParse, a pure Perl xml,xhtml parser
>> that is excellent for that. Search the forum or google. I think the
>> one posted was version 1.1
>
>The only thing Robic0's module is good for is to serve as a bad example.
>Go ahead and search Google Groups for it though - you'll find out what's
>wrong with it quickly enough.
>
>sherm--

Yeah, can you describe whats wrong with it, or you just blowing smoke?

Sln


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 713
**************************************


home help back first fref pref prev next nref lref last post