Skip Menu |

This queue is for tickets about the Parse-Yapp CPAN distribution.

Report information
The Basics
Id: 1675
Status: resolved
Priority: 0/
Queue: Parse-Yapp

People
Owner: Nobody in particular
Requestors: cogent [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 1.2



Subject: yapp places generated .pm file in the wrong place.
Given the command yapp -vs -m JavaScript::Grammar lib/JavaScript/Grammar.yp yapp placed the creates two files: ./lib/JavaScript/Grammar.output ./Grammar.pm Probably both files should be placed in the same directory, and ideally both in lib/JavaScript/
--- yapp Sun Feb 11 10:30:29 2001 +++ yapp-new Wed Oct 16 05:09:08 2002 @@ -246,7 +246,7 @@ and do { $package=$opt_m; $package=~/^(?:(?:[^:]|:(?!:))*::)*(.*)$/; - $outfile="$1.pm"; + $outfile="$path$1.pm"; }; $opt_o
[guest - Wed Oct 16 05:10:06 2002]: Show quoted text
> yapp placed the creates two files:
Sorry, that should read "yapp creates two files:"
Date: Thu, 17 Oct 2002 16:37:30 +0200
From: Francois Desarmenien <francois [...] fdesar.net>
To: bug-Parse-Yapp [...] rt.cpan.org
Subject: Re: [cpan #1675] yapp places generated .pm file in the wrong place.
RT-Send-Cc:
Le Wed, 16 Oct 2002 05:10:06 -0400 (EDT) "Guest via RT" <bug-Parse-Yapp@rt.cpan.org> a ecrit: Show quoted text
> > This message about Parse-Yapp was sent to you by guest via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=1675 > > > Given the command > > yapp -vs -m JavaScript::Grammar lib/JavaScript/Grammar.yp > > yapp placed the creates two files: > > ./lib/JavaScript/Grammar.output > ./Grammar.pm > > Probably both files should be placed in the same directory, and ideally both in lib/JavaScript/
In your case, probably: that's what the '-o' option is there for... This behaviour has already been discussed (I don't remember where and when) and I decided to keep it as a feature and it is documented as is (from yapp frontend pod): -o outfile The compiled output file will be named outfile for your parser module. It defaults to grammar.pm or, if you specified the option -m A::Module::Name (see below), to Name.pm. Maybe I should add at the end of the sentence "... in the current working directory" to make this clearer, but it's definitively NOT a bug. BTW, the yapp script is *only* a proposed front-end to be able to uses the Parse::Yapp modules to generate parsers easely: it's up to you to write another one that better meets your needs. Regards, François Désarménien Parse-Yapp author (FDESAR on CPAN)
This issue is now (finally) resolved. The documentation has been updated.