Author: chromatic Date: Sat Jan 24 15:17:30 2009 New Revision: 35977 Modified: trunk/lib/Parrot/Pmc2c/Dumper.pm trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm
Log: [lib] Renamed package in Parrot::Pmc2c::Dumper to just that and exported dump_pmc() so that the real Parrot::Pmc2c::Dumper can use it. See TT #224, reported by Jim Keenan. Modified: trunk/lib/Parrot/Pmc2c/Dumper.pm ============================================================================== --- trunk/lib/Parrot/Pmc2c/Dumper.pm (original) +++ trunk/lib/Parrot/Pmc2c/Dumper.pm Sat Jan 24 15:17:30 2009 @@ -1,24 +1,31 @@ -# Copyright (C) 2004-2006, The Perl Foundation. +# Copyright (C) 2004-2009, The Perl Foundation. # $Id$ -package Parrot::Pmc2c::Pmc2cMain; +package Parrot::Pmc2c::Dumper; + use strict; use warnings; + use Parrot::Pmc2c::UtilFunctions qw(slurp spew filename); use Parrot::Pmc2c::Parser qw(parse_pmc); use Carp; +use base 'Exporter'; +...@parrot::Pmc2c::Dumper::EXPORT_OK = 'dump_pmc'; + =head3 C<dump_pmc()> $return_value = dump_pmc($pmc2cMain); -B<Purpose:> Create a F<.dump> file for each file listed in pmc2cMain's -C<arg> key (which can be found in the directories listed in pmc2cMain's C<include> key). +B<Purpose:> Creates a F<.dump> file for each file listed in pmc2cMain's C<arg> +key (which can be found in the directories listed in pmc2cMain's C<include> +key). B<Arguments:> B<Return Values:> Returns 1 upon success. -B<Comments:> Called when C<--dump> is specified as the command-line option to F<pmc2c.pl>. +B<Comments:> Called when C<--dump> is specified as the command-line option to +F<pmc2c.pl>. =cut Modified: trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm ============================================================================== --- trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm (original) +++ trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm Sat Jan 24 15:17:30 2009 @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2008, The Perl Foundation. +# Copyright (C) 2004-2009, The Perl Foundation. # $Id$ package Parrot::Pmc2c::Pmc2cMain; use strict; @@ -7,9 +7,9 @@ use Storable; use Parrot::PMC (); use Parrot::Pmc2c::VTable (); -use Parrot::Pmc2c::Dumper; +use Parrot::Pmc2c::Dumper 'dump_pmc'; use Parrot::Pmc2c::Library (); -use Parrot::Pmc2c::UtilFunctions qw( filename ); +use Parrot::Pmc2c::UtilFunctions 'filename'; use Parrot::Pmc2c::PCCMETHOD (); use Parrot::Pmc2c::PMC::default (); use Parrot::Pmc2c::PMC::Null ();