Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I am a bit lost, and I hoping that the monks can help me on my way. I am the owner of a few CPAN modules (yes, that means I am a CPAN author), and I would like to publish them on GitHub. But I am LAZY. I want to do this:

MyObject->sendGitHub( 'pm_name' => 'MyCPAN::ModuleName', 'github_username' => 'Larry Wall', 'github_password' => 'TimToady', );

So I want the code to take my module (on CPAN) and release it on GitHub under my GitHub account. In other words, it will put the module in a new repo.

Can I do this already with a CPAN module? Is there something that could help me be lazy? Thanks!

Replies are listed 'Best First'.
Re: GitHub and CPAN
by Corion (Patriarch) on Aug 18, 2014 at 20:49 UTC

    How about

    chdir $module_repo_dir; system("git push github") == 0 or warn "Couldn't send to GitHub: $! / $?";

    Also see Git::Wrapper.

      Okay, thanks. I was wondering if there were a way to do this without having git locally installed but I guess that it wouldn't make sense without git.
Re: GitHub and CPAN
by frozenwithjoy (Priest) on Aug 19, 2014 at 03:52 UTC
    Wow, I can't believe that password actually worked!