Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

problems making Contextual::Return

by mifflin (Curate)
on Jan 30, 2007 at 18:05 UTC ( #597420=perlquestion: print w/ replies, xml ) Need Help??
mifflin has asked for the wisdom of the Perl Monks concerning the following question:

Help! I cannot get Contextual::Return to make.

Perl 5.8.0

#!uname -a
SunOS cofjora01d 5.9 Generic_117171-07 sun4us sparc FJSV,GPUZC-M

Any ideas?

# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Contextual::Return # make cp lib/Contextual/Return.pm blib/lib/Contextual/Return.pm cp lib/Contextual/Return/Failure.pm blib/lib/Contextual/Return/Failure +.pm Manifying blib/man3/Contextual::Return.3 Manifying blib/man3/Contextual::Return::Failure.3 # make test PERL_DL_NONLAZY=1 /home/utils/perl/bin/perl "-MExtUtils::Command::MM" +"-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00.load...........ok 1/1# Testing Contextual::Return v0.1.0 + t/00.load...........ok + t/args..............syntax error at t/args.t line 7, near "NUM " syntax error at t/args.t line 10, near "SCALARREF " Can't use global @_ in "my" at t/args.t line 10, near "= $_" syntax error at t/args.t line 10, near "$var }" Execution of t/args.t aborted due to compilation errors. t/args..............dubious + Test returned status 2 (wstat 512, 0x200) t/context_tests.....ok + t/fail..............Type of arg 1 to Contextual::Return::Failure::_FAI +L must be block or sub {} (not single ref constructor) at t/fail.t li +ne 17, near "}" Execution of t/fail.t aborted due to compilation errors. # Looks like your test died before it could output anything. t/fail..............dubious + Test returned status 255 (wstat 65280, 0xff00) t/fail_with.........ok + t/failures..........syntax error at t/failures.t line 11, near "; +}" syntax error at t/failures.t line 13, near "}" Execution of t/failures.t aborted due to compilation errors. # Looks like your test died before it could output anything. t/failures..........dubious + Test returned status 255 (wstat 65280, 0xff00) t/fixed.............syntax error at t/fixed.t line 7, near "NUM +" syntax error at t/fixed.t line 10, near "SCALARREF " Execution of t/fixed.t aborted due to compilation errors. t/fixed.............dubious + Test returned status 2 (wstat 512, 0x200) t/interp............Bareword found where operator expected at t/interp +.t line 11, near "SCALARREF" (Missing semicolon on previous line?) syntax error at t/interp.t line 9, near "LIST " syntax error at t/interp.t line 13, near ")" Execution of t/interp.t aborted due to compilation errors. # Looks like your test died before it could output anything. t/interp............dubious + Test returned status 255 (wstat 65280, 0xff00) t/lazy..............syntax error at t/lazy.t line 4, near "; 'foo'" syntax error at t/lazy.t line 5, near "}" Execution of t/lazy.t aborted due to compilation errors. t/lazy..............dubious + Test returned status 2 (wstat 512, 0x200) t/lvalue............ok + t/nonvoid...........syntax error at t/nonvoid.t line 8, near "VOID +" syntax error at t/nonvoid.t line 10, near "}" Execution of t/nonvoid.t aborted due to compilation errors. # Looks like your test died before it could output anything. t/nonvoid...........dubious + Test returned status 255 (wstat 65280, 0xff00) t/object............ok + t/pod-coverage......skipped all skipped: Test::Pod::Coverage 1.04 required for testing POD + coverage t/pod...............skipped all skipped: Test::Pod 1.14 required for testing POD t/scalar-to-list....Type of arg 1 to main::SCALAR must be block or sub + {} (not single ref constructor) at t/scalar-to-list.t line 7, near " +)" syntax error at t/scalar-to-list.t line 33, near "STR " syntax error at t/scalar-to-list.t line 35, near ")" Execution of t/scalar-to-list.t aborted due to compilation errors. # Looks like your test died before it could output anything. t/scalar-to-list....dubious + Test returned status 255 (wstat 65280, 0xff00) t/SCALAR............syntax error at t/SCALAR.t line 7, near "VALUE +" syntax error at t/SCALAR.t line 8, near "}" Execution of t/SCALAR.t aborted due to compilation errors. # Looks like your test died before it could output anything. t/SCALAR............dubious + Test returned status 255 (wstat 65280, 0xff00) t/simple............syntax error at t/simple.t line 11, near "NUM + " syntax error at t/simple.t line 14, near "SCALARREF " Execution of t/simple.t aborted due to compilation errors. t/simple............dubious + Test returned status 2 (wstat 512, 0x200) Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/SCALAR.t 255 65280 ?? ?? % ?? t/args.t 2 512 ?? ?? % ?? t/fail.t 255 65280 ?? ?? % ?? t/failures.t 255 65280 ?? ?? % ?? t/fixed.t 2 512 ?? ?? % ?? t/interp.t 255 65280 ?? ?? % ?? t/lazy.t 2 512 ?? ?? % ?? t/nonvoid.t 255 65280 ?? ?? % ?? t/scalar-to-list.t 255 65280 ?? ?? % ?? t/simple.t 2 512 ?? ?? % ?? 2 tests skipped. Failed 10/17 test scripts, 41.18% okay. 0/53 subtests failed, 100.00% +okay. *** Error code 2 make: Fatal error: Command failed for target `test_dynamic'
edit : added readmore tags

Comment on problems making Contextual::Return
Download Code
Replies are listed 'Best First'.
Re: problems making Contextual::Return
by diotalevi (Canon) on Jan 30, 2007 at 18:18 UTC

    Perhaps your version of perl just can't cope with the syntax. Have you tried this on a newer version? 5.8.0 like any other x.0 release is already known to be problematic.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      I'm sure that would do the trick. However, getting the company to upgrade has been quite painfull. I've been trying to get them to do it for over a year with no success. :-(
Re: problems making Contextual::Return
by Anonymous Monk on Jan 30, 2007 at 18:29 UTC
    I can't get it to work with Makefile.PL either. I get pretty much the same errors. If I use the Build.PL, though, it seems to work:
    $ perl ./Build.PL Checking whether your kit is complete... Looks good Checking prerequisites... Looks good Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'Contextual-Return' version 'v0.1.0' $ ./Build test lib/Contextual/Return.pm -> blib/lib/Contextual/Return.pm lib/Contextual/Return/Failure.pm -> blib/lib/Contextual/Return/Failure +.pm t/00.load...........ok 1/1# Testing Contextual::Return v0.1.0 t/00.load...........ok t/SCALAR............ok t/args..............ok t/context_tests.....ok t/fail..............ok t/fail_with.........ok t/failures..........ok t/fixed.............ok t/interp............ok t/lazy..............ok t/lvalue............ok t/nonvoid...........ok t/object............ok t/pod-coverage......ok t/pod...............ok t/scalar-to-list....ok t/simple............ok All tests successful. Files=17, Tests=184, 3 wallclock secs ( 1.54 cusr + 0.29 csys = 1.8 +3 CPU)
    Perhaps using the Module::Build alternative will work for you. If so, please file a bug report on the ExtUtils::MakeMaker install process at http://rt.cpan.org/Public/Dist/Display.html?Name=Contextual-Return
      I get the same problems with Build... edit: added readmore tags
Re: problems making Contextual::Return
by sgt (Chaplain) on Jan 30, 2007 at 20:02 UTC

    did you build all dependencies correctly? is Want (that needs XS) working properly?

    hth --stephan
      Yes, all dependencies were installed successfully, including Want.
Re: problems making Contextual::Return
by syphilis (Canon) on Jan 31, 2007 at 10:27 UTC
    It builds and tests ok for me with perl 5.8.8, but I get the same errors when I build with perl 5.8.0.

    That doesn't mean that the module can't be successfully used on perl 5.8.0 - it's just that parts of the test suite fail on perl 5.8.0. - which merely proves that the test suite (as opposed to the module itself) is unusable on perl 5.8.0.

    If I was stuck with perl 5.8.0, I would probably just install it and see how it goes ... though there's no guarantee that the same approach is advisable for you :-)

    Cheers,
    Rob

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2015-07-08 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls