Hi Joe,
On Tue Nov 24 15:02:58 2015, joseph.konczal.ctr@usno.navy.mil wrote:
Show quoted text> Shlomi,
>
> I hope I have adequately addressed your concerns with my first patch
> in the attached new patch. Thank you for taking the time to work with
> me to get this code into the package.
>
the patch was mostly fine except for:
1. It didn't have explicit close statements.
2. It was not based on the source directory (no lib/ prefix)
3. «print $fh $contents;» should be «print {$fh} $contents;» (not a bug, just a precaution).
I fixed these problems and applied the patch in a modified way. It should be OK in v0.0.9. Please let me know if it is working for you.
Regards,
-- Shlomi Fish
Show quoted text> Joe
>
> -----Original Message-----
> From: Shlomi Fish via RT [mailto:bug-CPANPLUS-Dist-
> Fedora@rt.cpan.org]
> Sent: Friday, November 20, 2015 3:30 AM
> To: Konczal, Joseph
> Subject: [Non-DoD Source] [rt.cpan.org #109170] make edit-metafile
> work for rpms
>
> <URL:
https://rt.cpan.org/Ticket/Display.html?id=109170 >
>
> Hi Joseph,
>
> some comments about your code:
>
> 1. You're using File::Slurp which is no longer recommended. See
>
http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-
> broken-and-wrong.html . You also didn't specify the imports
> explicitly. That put aside, I would prefer if you didn't add another
> dependency here , and instead write the _read_file/_write_file (with a
> leading underscore) functions explicitly.
>
> 2. You should specify the encoding of the files.
>
> 3. You mutate $contents by doing “$contents = FOO ($contents);” which
> I dislike. Please assign to a new variable.
>
> ------------
>
> Would you like to fix these issues yourself, or do you want me to do
> that for you? I'm going to await for your reply.
>
> Regards,
>
> -- Shlomi Fish
>
> On Thu Nov 19 17:41:41 2015, joseph.konczal.ctr@usno.navy.mil wrote:
> > Hi,
> >
> > I needed to edit the spec file of a Perl package I was creating with
> > cpan2build, in order to add some 'obsoletes' so it could properly
> > replace some RPMs of a few different version 0 packages that had been
> > combined into one version 1 package. Unfortunately, '--edit-
> > metafiles'
> > had not yet been implemented for CPANPLUS::Dist::Fedora, so I
> > implemented it via the attached patch.
> >
> > Joseph Konczal
> > Senior Programmer
> > General Dynamics Information Technology
> > (202) 762-1428 Direct
> > (240) 449-9295 Cell
> > joseph.konczal@gdit.com
> >