Acme-Octarine

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Acme::Octarine.

0.01  Sat Jun  7 11:26:12 2003
	- original version; created by h2xs 1.22 with options
		-b 5.4.0 --omit-XS -A -n Acme::Octarine

0.02  Fri Dec  2 18:52:30 GMT 2005
      Updatd to work with CPANPLUS 0.05x
      Léon can try to hide his data using package lexicals, but with the
      power of PadWalker I'm going to find it. :-)

META.yml  view on Meta::CPAN

# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
name:         Acme-Octarine
version:      0.02
version_from: Octarine.pm
installdirs:  site
requires:
    Acme::Colour:                  0
    CPANPLUS:                      0.05
    PadWalker:                     1
    Test::Simple:                  0

distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17

Makefile.PL  view on Meta::CPAN

use 5.004;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'		=> 'Acme::Octarine',
    'VERSION_FROM'	=> 'Octarine.pm', # finds $VERSION
    'PREREQ_PM'		=> {'Acme::Colour' => 0,
			    'Test::Simple' => 0,
			    'CPANPLUS' => 0.05,
			    'PadWalker' => 1.00,
			   },
    ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM => 'Octarine.pm', # retrieve abstract from module
       AUTHOR     => 'Nicholas Clark <nick@ccl4.org>') : ()),
);

Octarine.pm  view on Meta::CPAN


use Acme::Colour;

use vars qw($VERSION @Acmes);
$VERSION = '0.02';

# I need some hooks in Acme::Colour's constructor. But as we all know cut and
# paste is bad. So we are good and don't do that:

use B::Deparse;
use PadWalker 'closed_over';

# Frustratingly, he uses a package lexical %r, which foils a simple re-eval of
# the deparsed method code.
my $deparse = B::Deparse->new("-sC");
my $body = $deparse->coderef2text(\&Acme::Colour::new);
my $r = closed_over(\&Acme::Colour::new)->{'%r'};

# Add a my $sub; declaration at the top level
$body =~ s/([ \t]+)(bless)/$1my \$sub;\n$1$2/ or die $body;
# If colour is defined, look it up in the specials hash

README  view on Meta::CPAN

   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  Acme::Colour
  CPANPLUS
  PadWalker

COPYRIGHT AND LICENCE

Copyright (C) 2003,2005 Nicholas Clark

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.



( run in 0.294 second using v1.01-cache-2.11-cpan-05444aca049 )