Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How can I create a simple Autocad drawing with Perl

by Corion (Patriarch)
on Sep 29, 2019 at 16:01 UTC ( [id://11106841]=note: print w/replies, xml ) Need Help??


in reply to How can I create a simple Autocad drawing with Perl

Line 292 in CAD::Drawing::IO is:

foreach my $action qw(load save) {

One of the few changes in Perl syntax now requires parentheses around all lists. The following should be a fix:

foreach my $action (qw(load save)) {

You might want to report this as a bug to the author.

Replies are listed 'Best First'.
Re^2: How can I create a simple Autocad drawing with Perl
by Lotus1 (Vicar) on Sep 30, 2019 at 00:02 UTC

    Thanks for working on it. I'm sorry you wasted time on this module with all the other problems there are with it. I stopped debugging the build problems once I realized I couldn't get the openDWG toolkit. I shouldn't have included the build log. The author didn't fix the documentation years ago when people asked him about the dependencies on openDWG so I don't think he is interested in this module anymore.

Re^2: How can I create a simple Autocad drawing with Perl
by Anonymous Monk on Sep 29, 2019 at 18:19 UTC
    One of the few changes in Perl syntax now requires parentheses around all lists.

    When did that happen? Why would p5p give us one less way to do things while breaking an unknown number of CPAN modules? What's the point?

      One of the few changes in Perl syntax now requires parentheses around all lists.
      When did that happen? Why would p5p give us one less way to do things while breaking an unknown number of CPAN modules? What's the point?

      As others explained, it happened more or less in v5.14.0. And the cited statement "now requires parentheses around all lists" is unfortunately wrong.

      To make a long story short, you now have to have parentheses where they were always required by the documentation. A parser bug allowed to omit them sometimes. You don't have to wrap all lists in parentheses. In places like use, parentheses around lists are not required and were never required.

      For the details, read on.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      The point is that occasionally new features of Perl can only be released by restricting old syntax which might result in ambiguous parsing.

      But P5P isn't that careless: All modules undergo regression tests with every version of Perl. The results for CAD::Drawing can be seen here: http://matrix.cpantesters.org/?dist=CAD-Drawing+0.26

      As you see, it is well known that this module fails with all Perls starting from 5.18.2. And since then, as far as I know, the registered maintainer of the CPAN module should have received an email report about the failure.

      Like Corion wrote, the fix is dead simple. So, if you know how to contact the author, it doesn't hurt to nudge him (again). He did the latest release in 2006, but might still be willing to maintain the module.

      This happened in Perl 5.18, so about five years ago. I guess the breakage on CPAN wasn't too bad.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11106841]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 12:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found