Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Module::Starter in Windows fails due to getpwuid() not working

by DarthBobToo (Initiate)
on May 24, 2013 at 14:20 UTC ( #1035148=perlquestion: print w/ replies, xml ) Need Help??
DarthBobToo has asked for the wisdom of the Perl Monks concerning the following question:

I am developing a new module at work for Windows. I am attempting to use Module::Starter to set everything up, however, I am getting an error that it is failing due to the fact that getpwuid() is not found.

How can I get around this?

Comment on Module::Starter in Windows fails due to getpwuid() not working
Re: Module::Starter in Windows fails due to getpwuid() not working
by marto (Chancellor) on May 24, 2013 at 14:27 UTC

    An open bug for this problem was reported. If you want to use this module either use the previous version (the most recent introduced this feature according to the change log) or fix the problem and submit a patch.

    Update: I'll upload a patch when I get home.

      I'd love to fix the bug and submit the patch. Unfortunately, I'm at about a 'grasshopper' level of coding for the most part. :-)

      Thanks for the pointer to the bug tho. It's good to know I'm not going insane.

        The test suite failed when I tried to install the module (Strawberry Perl 5.16, Windows 7 pro 64bit), I changed line 96 of Module::Starter::Simple.pm from:

        if ( not $self->{author} ) {

        To

        if ( ( not $self->{author} ) && ( $^O ne 'MSWin32' ) ) {

        So it'll fall through to:

        croak "Must specify an author\n" unless $self->{author};

        rather than fall in a heap because getpwuid isn't implemented in this platform. So yes, you'll have to provide a value fo author, but at least this way the test suite will pass, the module will install without a force and you'll be told what to do to make it work. As I say, I'll look into the problem in more detail and submit an appropriate patch when I get home.

        Update: added to explanation for clarity.

        Update: Patch submitted.

Re: Module::Starter in Windows fails due to getpwuid() not working
by hdb (Prior) on May 24, 2013 at 14:30 UTC

    If you specify the author manually, you don't need getpwuid.

    use strict; use warnings; use Module::Starter; my %args = ( modules => [ 'Hdb' ], author => 'hdb', email => 'hdb@some.de', ); Module::Starter->create_distro(%args);
Re: Module::Starter in Windows fails due to getpwuid() not working ( module-starter --module Shabba --email email --author author --verbose --mi
by Anonymous Monk on May 24, 2013 at 19:06 UTC

    if you specify --author argument you won't encounter getpwuid

    author and email are mandatory

    module-starter --module Shabba --email email --author author --verbose --mi

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1035148]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2014-10-30 13:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls