~ubuntu-branches/ubuntu/natty/libgraphics-colornames-perl/natty

« back to all changes in this revision

Viewing changes to lib/Graphics/ColourNames.pm

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2004-10-01 12:49:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041001124942-3qlde82ir9850n0s
Tags: 1.05-1
* New upstream release. 
      - updates to POD
      - correction to Graphics::ColourNames
      - correction to README
      - a filehandle for a rgb.txt file can be specified
      - hooks to support CODE scheme types (as with module
        Graphics::ColorNames::GrayScale 2.00)
      - ColourNames.pm has same version of ColorNames.pm
      - added Graphics::ColourNames alias
      - minor changes to ColorNames.pm
      - corrected typo in REQUIREMENTS (wrong Perl version)
      - uses Module::Load for improved dynamic loading
      - EXISTS works across multiple color schemes
      - bug in FETCH that returned key has been fixed
      - corrected bad link in POD
      - rebuilt distribution with proper META.yml
      - added required rgb.txt for tests to MANIFEST and distro
      * now requires Perl 5.6.0
      - uses IO::File
      - option to parse an rgb.txt file
      - removed TODO from distribution
      - Netscape.pm, HTML.pm and Windows.pm warnings enabled
      - additions and corrections in POD
      - added Build.PL to distribution
      - added hex() and rgb() methods
      - created object-oriented interface
      - additions and corrections in POD

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Graphics::ColourNames;
 
2
 
 
3
require 5.006;
 
4
 
 
5
use strict;
 
6
use warnings;
 
7
 
 
8
require Graphics::ColorNames;
 
9
 
 
10
use base 'Graphics::ColorNames';
 
11
 
 
12
our $VERSION = '1.05';
 
13
 
 
14
our @EXPORT    = qw( );
 
15
our @EXPORT_OK = qw( hex2tuple tuple2hex );
 
16
 
 
17
sub hex2tuple {
 
18
  goto &Graphics::ColorNames::hex2tuple;
 
19
}
 
20
 
 
21
sub tuple2hex {
 
22
  goto &Graphics::ColorNames::tuple2hex;
 
23
}
 
24
 
 
25
1;
 
26
 
 
27
__END__
 
28
 
 
29
=head1 NAME
 
30
 
 
31
Graphics::ColourNames - alias for Graphics::ColorNames
 
32
 
 
33
=head1 SYNOPSIS
 
34
 
 
35
  use Graphics::ColourNames qw( hex2tuple tuple2hex );
 
36
 
 
37
  tie %NameTable, 'Graphics::ColourNames', 'X';
 
38
 
 
39
  my $rgbhex1 = $NameTable{'green'};    # returns '00ff00'
 
40
  my $rgbhex2 = tuple2hex( 0, 255, 0 ); # returns '00ff00'
 
41
  my @rgbtup  = hex2tuple( $rgbhex );   # returns (0, 255, 0)
 
42
 
 
43
  my $rgbhex3 = $NameTable{'#123abc'};  # returns '123abc'
 
44
  my $rgbhex4 = $NameTable{'123abc'};   # returns '123abc'
 
45
 
 
46
=head1 DESCRIPTION
 
47
 
 
48
This module is an alias for L<Graphics::ColorNames>, using the British
 
49
style of spelling.
 
50
 
 
51
It does not alter the spelling of individual colour names in colour
 
52
schemas.
 
53
 
 
54
=head1 AUTHOR
 
55
 
 
56
Robert Rothenberg <rrwo at cpan.org>
 
57
 
 
58
=head1 LICENSE
 
59
 
 
60
Copyright (c) 2004 Robert Rothenberg. All rights reserved.
 
61
This program is free software; you can redistribute it and/or
 
62
modify it under the same terms as Perl itself.
 
63
 
 
64
=cut
 
65