Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

problem setting up CPAN Tester reporter on strawberry perl -- CPAN::Reporter

by Discipulus (Canon)
on Feb 14, 2019 at 11:51 UTC ( [id://1229908]=perlquestion: print w/replies, xml ) Need Help??

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

Hello monks,

I'm really need some guidance in setting up a cpan tester framework within my strawberry distributions. Even if I finally ended with something usable I have a lots of doubts and things does not run smoothly as they used to be with my strawberry perl instances.

I've followed the manual at cpanwiki - quickstart (following numbered steps refer to the guide)

Three different options are given: cpan classic tool, cpanp and cpanm and I choosed the first because it's the basic tool that must run and because of some other reasons.

I use normally strawberry portable editions, so I downloaded a fresh copy of strawberry-perl-5.28.1.1-64bit-portable and extracted to c:\SCRIPTS and to play as nice as possible I cleaned PATH a bit: PATH=C:\SCRIPTS\perl5.28-64bit\perl\site\bin;C:\SCRIPTS\perl5.28-64bit\perl\bin;C:\SCRIPTS\perl5.28-64bit\c\bin;C:\Windows\system32;C:\Windows

Ok, let's follow the above mentioned guide:

step 1

cpan> install Task::CPAN::Reporter # a lot of output, but relevant parts are: Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Config\Tiny.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Devel\Autoflush.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Test\Reporter.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Test\Reporter\Trans +port.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Test\Reporter\Trans +port\File.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Test\Reporter\Trans +port\Null.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Reporter.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Reporter\API.p +m Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Reporter\Confi +g.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Reporter\FAQ.p +m Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Reporter\Histo +ry.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Reporter\Prere +qCheck.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Data\UUID.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Data\GUID.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\IO\Prompt\Tiny.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Fact.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Report.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource.p +m Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Fact\Hash. +pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Fact\Strin +g.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource\c +pan.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource\m +etabase.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource\p +erl.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource\c +pan\distfile.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource\m +etabase\fact.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource\m +etabase\user.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Resource\p +erl\commit.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\User\Email +Address.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\User\FullN +ame.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\User\Profi +le.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\User\Secre +t.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Report +.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\I +nstalledModules.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\L +egacyReport.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\P +erlConfig.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\P +rereqs.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\T +estEnvironment.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\T +esterComment.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\T +estOutput.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\CPAN\Testers\Fact\T +estSummary.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Metabase\Client\Sim +ple.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Test\Reporter\Trans +port\Metabase.pm Installing C:\SCRIPTS\perl5.28-64bit\perl\site\lib\Task\CPAN\Reporter. +pm Appending installation info to C:\SCRIPTS\perl5.28-64bit\perl\lib/perl +local.pod DAGOLDEN/Task-CPAN-Reporter-0.003.tar.gz C:\SCRIPTS\perl5.28-64bit\c\bin\gmake.exe install UNINST=1 -- OK

step 2

C:\SCRIPTS\perl5.28-64bit>metabase-profile Enter full name: lorenzo Enter email address: lorenzo@cpan.org Enter password/secret: ********* Writing profile to 'metabase_id.json'

step 3

C:\SCRIPTS\perl5.28-64bit> mkdir %HOMEDRIVE%%HOMEPATH%\.cpantesters C:\SCRIPTS\perl5.28-64bit> copy metabase_id.json %HOMEDRIVE%%HOMEPATH% +\.cpantesters 1 file copied.

step 4 (Note: the only non default answer i gave was the first: I want to send reports! I searched the FAQ about it but found nothing. Also note that I specified the mail address in a wrong way and caused the Name not appearing: a bit more check will be good though.. or two fields: display name and mail address )

cpan> o conf init test_report ... <test_report> Generate test reports if CPAN::Reporter is installed (yes/no)? [no] ye +s Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157, <STDIN> line 1. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157, <STDIN> line 1. Would you like me configure CPAN::Reporter now? [yes] Proceeding to configure CPAN::Reporter. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157, <STDIN> line 2. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157, <STDIN> line 2. ... CPAN::Reporter: no config file found; creating a new one. CPAN::Reporter requires a valid email address to identify senders in the body of a test report. Please use a standard email format like: "John Doe" <jdoe@example.com> email_from? [] lorenzo@cpan.org ... (Recommended: 'default:ask/no pass/na:no') edit_report? [default:ask/no pass/na:no] ... (Recommended: 'default:ask/yes pass/na:yes') send_report? [default:ask/yes pass/na:yes] ... (Recommended: 'Metabase uri https://metabase.cpantesters.org/api/v1/ i +d_file metabase_id.json') transport? [Metabase uri https://metabase.cpantesters.org/api/v1/ id_f +ile metabase_id.json] Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157, <STDIN> line 6. Would you like to run 'metabase-profile' now to create 'C:\SCRIPTS\per +l5.28-64bit\data\.cpanreporter\metabase_id.json'? [y] Running [C:\SCRIPTS\PERL5~1.28-\perl\site\bin\metabase-profile.BAT --o +utput C:\SCRIPTS\perl5.28-64bit\data\.cpanreporter \metabase_id.json --email lorenzo@cpan.org --secret ********]... Enter full name: Writing profile to 'C:\SCRIPTS\perl5.28-64bit\data\.cpanreporter\metab +ase_id.json' CPAN::Reporter: writing config file to 'C:\SCRIPTS\perl5.28-64bit\data +\.cpanreporter\config.ini'. Returning to CPAN configuration. commit: wrote 'C:\SCRIPTS\perl5.28-64bit\perl\lib/CPAN/Config.pm' cpan> cpan> cpan> cpan> o conf commit commit: wrote 'C:\SCRIPTS\perl5.28-64bit\perl\lib/CPAN/Config.pm' cpan>

doubt 1

What happened? Was the metabase_id.json created another time? Which one will be used? That I created in step 2 and copied in step 3 or that created in step 4 at C:\SCRIPTS\perl5.28-64bit\data\.cpanreporter\metabase_id.json ??

doubt 2

where all these errors comes from (see the above output)?

Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157, <STDIN> line 1.

step 5 Let's try!

cpan> test Win32::File Database was generated on Mon, 11 Feb 2019 20:25:05 GMT Running test for module 'Win32::File' Fetching with LWP: http://cpan.strawberryperl.com/authors/id/J/JD/JDB/Win32-File-0.07.tar +.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/id/J/JD/JDB/CHECKSUMS Checksum for C:\SCRIPTS\perl5.28-64bit\cpan\sources\authors\id\J\JD\JD +B\Win32-File-0.07.tar.gz ok Scanning cache C:\SCRIPTS\perl5.28-64bit\cpan\build for sizes ...................................................................... +......DONE Configuring J/JD/JDB/Win32-File-0.07.tar.gz with Makefile.PL Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Checking if your kit is complete... Looks good Generating a gmake-style Makefile Writing Makefile for Win32::File Writing MYMETA.yml and MYMETA.json (C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe Makefile.PL exited with 0 +) CPAN::Reporter: Makefile.PL result is 'pass', No errors. JDB/Win32-File-0.07.tar.gz C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe Makefile.PL -- OK Running make for J/JD/JDB/Win32-File-0.07.tar.gz Subroutine JSON::PP::Boolean::(++ redefined at C:\SCRIPTS\perl5.28-64b +it\perl\lib/overload.pm line 48. Subroutine JSON::PP::Boolean::(0+ redefined at C:\SCRIPTS\perl5.28-64b +it\perl\lib/overload.pm line 48. Subroutine JSON::PP::Boolean::(-- redefined at C:\SCRIPTS\perl5.28-64b +it\perl\lib/overload.pm line 48. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. cp File.pm blib\lib\Win32\File.pm Running Mkbootstrap for File () "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" -MExtUtils::Command -e c +hmod -- 644 "File.bs" "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" -MExtUtils::Command::MM +-e cp_nonempty -- File.bs blib\arch\auto\Win32\Fil e\File.bs 644 "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" "C:\SCRIPTS\perl5.28-64b +it\perl\lib\ExtUtils/xsubpp" -typemap C:\SCRIPTS\ perl5.28-64bit\perl\lib\ExtUtils\typemap -typemap C:\SCRIPTS\perl5.28- +64bit\cpan\build\Win32-File-0.07-0\typemap File.x s > File.xsc "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" -MExtUtils::Command -e m +v -- File.xsc File.c gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDI +O -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bit +fields -s -O2 -DVERSION=\"0.07\" -DXS_VERSION=\" 0.07\" "-IC:\SCRIPTS\perl5.28-64bit\perl\lib\CORE" File.c "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Win32::File\", 'DLBASE' => 'File', 'DL_F +UNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { } , 'DL_VARS' => []);" g++.exe File.def -o blib\arch\auto\Win32\File\File.xs.dll -mdll -s -L" +C:\SCRIPTS\perl5.28-64bit\perl\lib\CORE" -L"C:\SCR IPTS\perl5.28-64bit\c\lib" File.o "C:\SCRIPTS\perl5.28-64bit\perl\li +b\CORE\libperl528.a" -lmoldname -lkernel32 -luser3 2 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut3 +2 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversi on -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" -MExtUtils::Command -e c +hmod -- 755 blib\arch\auto\Win32\File\File.xs.dll (C:\SCRIPTS\perl5.28-64bit\c\bin\gmake.exe exited with 0) CPAN::Reporter: gmake result is 'pass', No errors. JDB/Win32-File-0.07.tar.gz C:\SCRIPTS\perl5.28-64bit\c\bin\gmake.exe -- OK Running make test Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" -MExtUtils::Command::MM +-e cp_nonempty -- File.bs blib\arch\auto\Win32\Fil e\File.bs 644 "C:\SCRIPTS\perl5.28-64bit\perl\bin\perl.exe" "-MExtUtils::Command::MM +" "-MTest::Harness" "-e" "undef *Test::Harness::Sw itches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/file.t .. ok All tests successful. Files=1, Tests=5, 1 wallclock secs ( 0.06 usr + 0.00 sys = 0.06 CPU +) Result: PASS (C:\SCRIPTS\perl5.28-64bit\c\bin\gmake.exe test exited with 0) CPAN::Reporter: Test result is 'pass', All tests successful. CPAN::Reporter: preparing a CPAN Testers report for Win32-File-0.07 Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. CPAN::Reporter: sending test report with 'pass' via Metabase Use of uninitialized value $_[0] in string eq at C:/SCRIPTS/perl5.28-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. JDB/Win32-File-0.07.tar.gz C:\SCRIPTS\perl5.28-64bit\c\bin\gmake.exe test -- OK cpan>

doubt 3

I defeinitively messed my cpan? ;(

doubt 4

I go to http://metabase.cpantesters.org/tail/log.txt to see which profile was used (steps 2,3 or step 4 one?) and I see:

[2019-02-11T21:02:29Z] [] [pass] [JDB/Win32-File-0.07.tar.gz] [MSWin32 +-x64-multi-thread] [perl-v5.28.1] [1b296cef-6c08-1014-b6df-cd4687d894 +94] [2019-02-11T21:02:29Z]

No lorenzo name in square brackets is shown.. so I presume that in step 4 was used: infact the other has the name present but there is not in that created in step 4

After some hours I found two entries in the matrix:

They both are mine.. they both have no name displayed..

others doubts

It's acceptable the above situation? I made some gross, coarse errors? It's the documentation erroneous? It's some of the used modules bugged under windows and this is the cause of all that File::Spec::Win32 errors?

Tests are useful, no? If so I'd expect the testing reporting framework setup to be reliable on all platforms or I'm wrong?

Generally spekking: which is the mechanism involved? what is the role of the metabase_id.json file? And what about the other file generated in step 4 (now I'm sure there are used these: I see the reports-sent.db populated)?

Directory di C:\SCRIPTS\perl5.28-64bit\data\.cpanreporter 11/02/2019 21:57 199 config.ini 11/02/2019 21:57 1.871 metabase_id.json 11/02/2019 22:02 119 reports-sent.db

Can I modify them (for example to include my name)? How? I must copy them if I want to use the same infos for other perl instance?

I'd really wanna help but who can help me?

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re: problem setting up CPAN Tester reporter on strawberry perl -- CPAN::Reporter
by pryrt (Abbot) on Feb 14, 2019 at 16:41 UTC

    I cannot help you with the cpan-specific questions -- like the uninitialized errors -- because I set mine up with cpanm, not the default cpan client; sorry. But I do know that the location of the .cpanreporter directory changes depending on whether you have an installed strawberry or use the portable strawberry. Your original creation of the metabase_id.json file went where it would have been expected for the installed version, but you then used a portable, so it created a new one where portable-strawberry wanted it to be. It would make sense, then, that it would use the step-4 metabase_id rather than the step1-3 metabase_id.

    I'm assuming these are the tests you were mentioning: I now see three, two with no name, and one with the name present. If so, your most-recent submission used your name.

    I don't know if it's safe to edit the fields in the metabase_id.json, but it should be okay at least in the config.ini, though I haven't tried. The reason I'd be skeptical about the .json is that I don't know if the various GUID/UUID in the metabase_id.json have checksums built in compared to your real data. However, I do know that I've successfully copied my .cpanreporter folder to multiple versions of portable strawberry, and they all submit under my one name. So if you've got one .cpanreporter folder that has your name the way you like it, you can copy that into the appropriate locations for any portable or installed strawberry you might install, and it will use the same behind-the-scenes information for every submission.

    (BTW: since you revealed your PAUSE ID here, and I remembered your sadness a few days back of so few passes in your CPAN submission, I just went and gave you a few versions worth of PASSes for the matrix; they should eventually hit the "normal" matrix at the next refresh -- which may be in the next hour or so, if it does it 24 hours after the last, like I've sometimes seen it do. Hope that helps. :-) )

      Hello pryrt and thanks for looking at my longish post,

      > ... because I set mine up with cpanm

      1) I for sure will give this way a try. I had not the best experience with this tool but if it offers a cleaner, inteleggible, customizable and easy way to set up a cpan tester environment I will adopt it without esitations.

      My intention is to spot all dark corners of the cpan tester setup in strawberry and, possibly, end with a little walktrough: infact i see few win32 testers and many times using punch card era machines (my respect for them anyway but the spectrum is by far too little).

      > cpan-specific questions -- like the uninitialized errors

      2) This is one of my major dissapoint at the moment. I'm used to see perl running smoothly and shining for its intrinsic quality. I expect (with all the patience I'm able of) the toolchain to be super portable, super tested, super simple, super reliable. Super as perl. Which modules of the dozens installed by the Task::CPAN::Reporter bundle causes the error? Not even using Carp?

      Little excursus: why this huge amount of non core dependencies? I see this signaled as issue and srezic propose a super simple approach I very like this direction: cut, cut, cut.. I'll try his way too.

      > I'm assuming these are the tests you were mentioning: I now see three, two with no name, and one with the name present. If so, your most-recent submission used your name.

      3) Yes they are, but I'm conducing various tests from two machines and always with brand new strawberry installations with a sanitized PATH and the third report comes from my home machine (and see also my note at step 4 above). I'm collecting all quirks and unwanted behaviours and probably results from this other test will go in a sperate post in this thread.

      > However, I do know that I've successfully copied my .cpanreporter folder to multiple versions of portable strawberry

      4) Theese are good news! Which steps you'have done before copying it? Also this must be documented in a better way, imho.

      > your PAUSE ID here, and I remembered your sadness a few days back of so few passes

      5) ;=) thanks! you are very kind even if this is the very last of my concerns at the moment. The whole point of my experimental module is the presence of an executable that I supposed to be present almost since ever, but were not present in these punch card machine of the respected testers. No worry ;) I have added a check in the Makefile.PL and, even if not optimal I know the problem. I also have few things to change. i call it an experiment because was my own gymnasium confronting my knoledges in the wild. But thanks!

      L*

      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

        >>... because I set mine up with cpanm

        > 1) I for sure will give this way a try. I had not the best experience with this tool but if it offers a cleaner, inteleggible, customizable and easy way to set up a cpan tester environment I will adopt it without esitations.

        I don't know that I'd go so far as "cleaner". I just did the cpanm version, because I always use cpanm to install modules already. One of the downfalls is that cpanm-reporter does not auto-report after installing a module, whereas the docs imply that the cpan and cpanplus solutions do. Further, if you're going to use old versions (especially strawberry's 5.10), cpanm is hard to get working right (at least for me), and cpanm-reporter is even harder.

        > My intention is to spot all dark corners of the cpan tester setup in strawberry and, possibly, end with a little walktrough: infact i see few win32 testers and many times using punch card era machines (my respect for them anyway but the spectrum is by far too little).

        Yeah, the lack of win32 testers is one of the reasons I setup cpanm-reporter for myself, as well. For the "punch card era machines", I think, the issue is from the "smoke testers" -- ie, the ones that set it up to automatically test new modules as they are submitted to CPAN, rather than just on-install testers like myself -- unlike linux, Windows OS aren't free, and a smoke-testing machine is often a dedicated machine, so it's easier to use an older PC, than to buy a machine just to smoke-test, or to try to multitask a machine that's doing smoke-testing in the background, but is your daily-use PC in the foreground. (I also wonder whether many Windows smoke-testers are on virtual machines, and whether those virtual machines might have a limited subset of what's normally installed on modern Windows.)

        I really do wish, however, that the Quick Start and related docs would give a better explanation for how to set up an automated smoke-test machine in the Windows/Strawberry environment. I might have or find an older Win-PC that I could dedicate to smoke-testing, if there were a ready-made guide. (And I'd probably be willing to try a non-cpanm solution, if cpanm doesn't lend itself to the automated environment of smoke-testing)

        >> However, I do know that I've successfully copied my .cpanreporter folder to multiple versions of portable strawberry

        >4) Theese are good news! Which steps you'have done before copying it? Also this must be documented in a better way, imho.

        I did the full setup once, similar to what you did in steps1-3, but putting it in the right location for the portable strawberry. I then copied that to a private subversion repo I have. Then, when I do new perl versions that I want to be able to cpanm-reporter, I install App::cpanminus::reporter, then svn export the .cpanreporter directory to the right location, and it's ready to go.

        > 5) ;=) thanks! you are very kind even if this is the very last of my concerns at the moment.

        That was more of a side-benefit of your post, that I thought I'd let you know about. :-)

        I dug up my readme file that I keep with my .cpanreporter repo; it's highly cpanm-specific, but it may come in handy for you (or others), especially if they have a strawberry-v5.10

        http://wiki.cpantesters.org/wiki/QuickStart => explains how to get started...
            -- this svn directory includes my metabase_id.json and config.ini...
                QuickStart is a little ambiguous where it goes
        
        I had set this up Fall 2017 (based on dates), but apparently here, that perl install had been lost...
        
        Since I use cpanm, SETUP:
        0) per https://github.com/rjbs/Data-UUID/issues/24, bug in Data::UUID install process, so `mkdir c:\tmp`, then `cpanm Data::UUID` first
        1) install `cpanm App::cpanminus::reporter`
        2) run `cpanm-reporter --setup` (or copy this folder to either berrybrew\perls\#\data\.cpanreporter\ and/or %home%\data\.cpanreporter )
        
        * compatibility notes:
            - 5.10: does not have its own cpanm, so it finds my default-PATH strawberry 5.26 cpanm and tries to use that, which won't work right;
              Workaround = while strawberry 5.10 is selected, 
                * download tarball from "Download" link on https://metacpan.org/pod/cpanm
                * tar xvzf App-cpanminus*.tar.gz
                * cd  App-cpanminusTAB
                * perl Makefile.PL
                * edit Makefile to ensure it doesn't call out c:\strawberry, and instead always uses the specific 5.10 directory
                * dmake
                * #dmake test       # unneeded, because they don't have a real test suite
                * dmake install
                * where cpanm                       # make sure 5.10's cpanm occurs first
                * cpanm --force App::cpanminus      # re-install with cpanm
            - 5.10: at home
                * had to use 5.10.1.2 portable, not berrybrew's 5.10.1.5 zip :-(
                * approximately the following sequence worked for getting reporter installed (there were more atttemps at the main ::reporter package in between):
                    cpanm Test::More
                    cpanm IO::Prompt::Tiny
                    cpanm http://cpan.metacpan.org/authors/id/G/GA/GARU/App-cpanminus-reporter-0.10.tar.gz
                    cpanm --notest CPAN::Testers::Common::Client
                    cpanm http://cpan.metacpan.org/authors/id/G/GA/GARU/App-cpanminus-reporter-0.10.tar.gz
                * Also having problems with SSL
                    try .cpanmreporter/config.ini with http:// instead of https:// => yep, I can send reports now
                * might need to check portable.perl for duplicate 'installbin' or other tags...
        
        Every time I install a package, need to manually run cpanm-reporter afterward...
        1) `cpanm Package(s)`
        2) `cpanm-reporter`
            -- with my cpanm setup in berrybrew, might have to go into individual %HOME%\.cpanm\work and do `cpanm-reporter --build_dir=.`
            -- oh, maybe it always copies the most recent build.log into %home%\.cpanm\build.log... run some experiments...
                -- 5.12 and 5.16 seemed to update it live
                -- 5.20 seems to copy after the build is completes
                -- 5.26.1_32 -- wouldn't build Data::UUID, even with c:\tmp existing (different error message: 193)
            -- thus, I can use `cpanm-reporter --build_dir=%HOME%\.cpanm` ir
            -- At $work, I have the %HOME% environment variable set (not a default windows variable, but some $work-apps use it);
                * if that's set, then cpanm uses %HOME%\.cpanm...
                * if it's not set (like on my personal home PC), then each portable strawberry hierarchy uses its own .cpanm folder for build.log,
                  similar to the own .cpanreporter directory I mentioned above.  using `cpanm --look Some::Distro` will tell you where this .cpanm
                  directory is when it opens up a cmd.exe shell in the temporary work directory, which is in the correct .cpanm hierarchy.  
              - I have been known to make a cpanm-with-reporter.bat file, placed next to the cpanm.bat and cpanm-reporter.bat, which contains 
                something like
                        @call path\to\cpanm.bat %*
                        @call path\to\cpanm-reporter
                
        3) check http://metabase.cpantesters.org/tail/log.txt -- should update every 5-10 minutes
        
Re: problem setting up CPAN Tester reporter on strawberry perl -- CPAN::Reporter -- good news!
by Discipulus (Canon) on Feb 17, 2019 at 13:24 UTC
    Hello again,

    I used a lot of perseverance and I knocked many doors and after some initial misunderstandings, I was given attention in the #toolchain irc perl channel (thanks Tux to address me there).

    Some smart guys lurk there and they finally been able to reproduce my errors (the use of initialized value in File::Spec::Win32 just after the start of configuration o conf init test_report inside cpan client). This will happen only with portable strawberry edition and not with the installed version (.msi package), but seems to happen with every portable version.

    A good advice I got was: set PERL5OPT=-d:Confess which highligthed a bit more the error source:

    Use of uninitialized value $_[0] in string eq at D:/SCRIPTS/perl5.26-6 +4bit/perl/lib/File/Spec/Win32.pm line 157. File::Spec::Win32::catdir("File::Spec", undef, ".cpanreporter" +) called at D:\SCRIPTS\perl5.26-64bit\perl\site\lib/CPAN/Reporter/Con +fig.pm line 362

    which lead to File::Homedir asking for my_documents

    # installed straberry perl perl -MFile::HomeDir -E "say +File::HomeDir->my_documents(); say $File +::HomeDir::IMPLEMENTED_BY" C:\Users\NAME\Document File::HomeDir::Windows # portable straberry perl perl -MFile::HomeDir -E "say +File::HomeDir->my_documents(); say $File +::HomeDir::IMPLEMENTED_BY" # <--- NO OUTPUT aka undef! Portable::HomeDir

    Infact the portable versions have a portable.perl which defines

    HomeDir: my_home: data my_data: data

    But not my_document tadà! The minimal effort patch was already submitted at strawberry github repository

    So we are going in the right direction, even if many things are still pending:

    1- if the above patch will be accepted then portable editions will correctly use data/.cpanreporter (without warnings) ( update March 18th 2019 the PR was merged)

    2- installed aka non portable SP were not affected by the above

    3- as side note Data::UUID has a pending PR to use File::Spec->tmpdir instead of c:\tmp ( PS see Data-UUID/pull/32 ) update March 2019 PR has gone into new release

    4- setting PERL_CPAN_REPORTER_DIR to something valid would avoided the above errors

    5- documentation at cpan tester quick start guide needs to be reviewed a bit

    PS oh I missed some important stuff!

    Given the above PERL_CPAN_REPORTER_DIR seems to be the clues to have the single or smoke env to be setu correctly. A system wide env set or a replicated var for each portable installation (I prefere the latter..) will be the trick (to be still tested).

    Another good news is that there is a mailing list (low traffic) and I signed to it. A message has a lot of useful informations: see it archived

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found