Re: [perl #54000] [DEPRECATED] get_array, get_list, get_scalar methods

2008-11-13 Thread Patrick R. Michaud
On Thu, Nov 13, 2008 at 07:40:52AM -0800, Will Coleda via RT wrote:
  I probably just need to remove the methods from the code,
  see what breaks, and fix what breaks.  I'll try to do that this
  weekend before the release.  If it doesn't happen then, we can
  do it immediately following the release.
 
 If you can provide a patch that does the removal, someone else can do 
 the grunt work of making sure everything still works.

Attached.

Pm
Index: runtime/parrot/library/Parrot/Capture_PIR.pir
===
--- runtime/parrot/library/Parrot/Capture_PIR.pir	(revision 32625)
+++ runtime/parrot/library/Parrot/Capture_PIR.pir	(working copy)
@@ -39,17 +39,6 @@
 .end
 
 
-# deprecated RT#54000
-.sub 'get_array' :method
-.tailcall self.'list'()
-.end
-
-# deprecated RT#54000
-.sub 'get_hash' :method
-.tailcall self.'hash'()
-.end
-
-
 .sub 'unshift_pmc' :vtable :method
 .param pmc val
 $P0 = self.'list'()
Index: src/pmc/capture.pmc
===
--- src/pmc/capture.pmc	(revision 32625)
+++ src/pmc/capture.pmc	(working copy)
@@ -463,7 +463,7 @@
 
 */
 
-METHOD get_array() {
+METHOD list() {
 PMC *capt_array;
 PMC *capt = SELF;
 /* XXX:  This workaround is for when we get here as
@@ -481,7 +481,7 @@
 RETURN(PMC *capt_array);
 }
 
-METHOD get_hash() {
+METHOD hash() {
 PMC *capt_hash;
 PMC *capt = SELF;
 /* XXX:  This workaround is for when we get here as
Index: t/pmc/capture.t
===
--- t/pmc/capture.t	(revision 32625)
+++ t/pmc/capture.t	(working copy)
@@ -243,9 +243,9 @@
 0 0
 OUTPUT
 
-pir_output_is( $PRE . 'CODE'. $POST, 'OUTPUT', get_hash, get_array );
-$P0 = capt.'get_array'()
-$P1 = capt.'get_hash'()
+pir_output_is( $PRE . 'CODE'. $POST, 'OUTPUT', hash, list );
+$P0 = capt.'list'()
+$P1 = capt.'hash'()
 
 $S0 = typeof $P0
 $S1 = typeof $P1
@@ -297,7 +297,7 @@
 2
 OUTPUT
 
-pir_output_is( 'CODE', 'OUTPUT', 'get_array method delegation' );
+pir_output_is( 'CODE', 'OUTPUT', 'list method delegation' );
 .sub main :main
 $P0 = subclass 'Capture', 'Match'
 addattribute $P0, '$.abc'
@@ -310,7 +310,7 @@
 $P2 = new 'String'
 setattribute $P1, '$.xyz', $P2
 
-$P2 = $P1.'get_array'()
+$P2 = $P1.'list'()
 $P2 = 0
 $I0 = elements $P2
 print $I0


Re: [perl #54000] [DEPRECATED] get_array, get_list, get_scalar methods

2008-09-11 Thread Patrick R. Michaud
On Wed, Sep 10, 2008 at 07:53:13PM -0700, James Keenan via RT wrote:
 Patrick:
 
 Where do we stand in the deprecation cycle re these three methods?

I probably just need to remove the methods from the code,
see what breaks, and fix what breaks.  I'll try to do that this
weekend before the release.  If it doesn't happen then, we can
do it immediately following the release.

Pm


[perl #54000] [DEPRECATED] get_array, get_list, get_scalar methods

2008-09-10 Thread James Keenan via RT
Patrick:

Where do we stand in the deprecation cycle re these three methods?

Thank you very much.

kid51


[perl #54000] [DEPRECATED] get_array, get_list, get_scalar methods

2008-05-11 Thread via RT
# New Ticket Created by  Patrick R. Michaud 
# Please include the string:  [perl #54000]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=54000 


The Cget_array, Cget_hash, and Cget_scalar methods on
various capture-like objects are deprecated in favor of
Clist, Chash, and Citem methods.  The older get_*
versions remain for compatibility (and simply delegate to
the new methods) but will be removed after the May 2008 release.

Pm