#1705: 0-args :main Subs will check passed arguments.
-------------------------+--------------------------------------------------
 Reporter:  bacek        |       Owner:       
     Type:  deprecation  |      Status:  new  
 Priority:  normal       |   Milestone:  3.0  
Component:  none         |     Version:  trunk
 Severity:  medium       |    Keywords:       
     Lang:               |       Patch:       
 Platform:               |  
-------------------------+--------------------------------------------------
 After 2.6 we'll enable check arguments of 0-args Subs which can break
 current :main Sub invocation.

 For example
 {{{
 .sub "foo" :main
    say "Hello world"
 .end
 }}}
 will throw an exception if command-line arguments passed.

 For updating from current behaviour :main Sub should declare {{{.param pmc
 args :slurpy}}} to work with any numbers of arguments.

 See also #1033 for original "0-args Subs" ticket.

 See also  http://irclog.perlgeek.de/parrotsketch/2010-07-13#i_2550626 for
 discussion.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1705>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to