package Imager::CountColor;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA @EXPORT_OK);
require Exporter;
-@EXPORT_OK = 'count_color';
+our @EXPORT_OK = 'count_color';
BEGIN {
- $VERSION = "0.02";
- @ISA = qw(Exporter);
-
+ our $VERSION = "0.03";
+ our @ISA = qw(Exporter);
+
require XSLoader;
XSLoader::load('Imager::CountColor', $VERSION);
}
package Imager::Filter::DynTest;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.02";
+ our $VERSION = "0.03";
require XSLoader;
XSLoader::load('Imager::Filter::DynTest', $VERSION);
package Imager::Font::FT2;
+use 5.006;
use strict;
use Imager;
use Scalar::Util ();
-use vars qw($VERSION @ISA);
-@ISA = qw(Imager::Font);
+our @ISA = qw(Imager::Font);
+
+our $VERSION;
BEGIN {
$VERSION = "0.98";
package Imager::Filter::Flines;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.03";
+ our $VERSION = "0.04";
require XSLoader;
XSLoader::load('Imager::Filter::Flines', $VERSION);
package Imager::File::GIF;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.96";
+ our $VERSION = "0.96";
require XSLoader;
XSLoader::load('Imager::File::GIF', $VERSION);
package Imager::File::ICO;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.06";
+ our $VERSION = "0.07";
require XSLoader;
XSLoader::load('Imager::File::ICO', $VERSION);
package Imager::File::CUR;
+use 5.006;
use strict;
+our $VERSION = "1.000";
# all the work is done by Imager::File::ICO
use Imager::File::ICO;
package Imager;
+use 5.006;
use strict;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS %formats $DEBUG %filters %DSOs $ERRSTR %OPCODES $I2P $FORMATGUESS $warn_obsolete);
use IO::File;
use Scalar::Util;
use Imager::Color;
use Imager::Font;
use Config;
-@EXPORT_OK = qw(
+our $ERRSTR;
+
+our @EXPORT_OK = qw(
init
init_log
DSO_open
NCF
);
-@EXPORT=qw(
+our @EXPORT=qw(
);
-%EXPORT_TAGS=
+our %EXPORT_TAGS=
(handy => [qw(
newfont
newcolor
# this will be used to store global defaults at some point
my %defaults;
+our $VERSION;
+
BEGIN {
require Exporter;
my $ex_version = eval $Exporter::VERSION;
if ($ex_version < 5.57) {
- @ISA = qw(Exporter);
+ our @ISA = qw(Exporter);
}
$VERSION = '1.011';
require XSLoader;
t1 => "Imager::Font::T1",
);
+our %formats;
+
tie %formats, "Imager::FORMATS", \%formats_low, \%format_classes;
+our %filters;
+
+our $DEBUG;
+our %OPCODES;
+our $FORMATGUESS;
+our $warn_obsolete;
+
BEGIN {
for(i_list_formats()) { $formats_low{$_}++; }
}
}
-# Load a filter plugin
+# Load a filter plugin
+
+our %DSOs;
sub load_plugin {
my ($filename)=@_;
# NOTE - should make a utility function to check transforms for
# stack overruns
+our $I2P;
+
sub transform {
my $self=shift;
my %opts=@_;
package Imager::File::JPEG;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.94";
+ our $VERSION = "0.94";
require XSLoader;
XSLoader::load('Imager::File::JPEG', $VERSION);
t/950-kwalitee/050-meta.t Check META.yml is valid
t/950-kwalitee/060-podstruct.t
t/950-kwalitee/070-mymeta.t
+t/950-kwalitee/080-nousevars.t Check various standards
t/GoodTestFont.pm A dummy (hardly implemented) font driver.
t/Pod/Coverage/Imager.pm
t/t1000lib/Imager/File/BAD.pm Test failing to load a file handler
package Imager::Filter::Mandelbrot;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.04";
+ our $VERSION = "0.05";
require XSLoader;
XSLoader::load('Imager::Filter::Mandelbrot', $VERSION);
package Imager::File::PNG;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.95";
+ our $VERSION = "0.95";
require XSLoader;
XSLoader::load('Imager::File::PNG', $VERSION);
package Imager::File::SGI;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.04";
+ our $VERSION = "0.05";
require XSLoader;
XSLoader::load('Imager::File::SGI', $VERSION);
package Imager::Font::T1;
+use 5.006;
use strict;
use Imager::Color;
-use vars qw(@ISA $VERSION);
-@ISA = qw(Imager::Font);
+our @ISA = qw(Imager::Font);
use Scalar::Util ();
BEGIN {
- $VERSION = "1.027";
+ our $VERSION = "1.027";
require XSLoader;
XSLoader::load('Imager::Font::T1', $VERSION);
package Imager::File::TIFF;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.92";
+ our $VERSION = "0.92";
require XSLoader;
XSLoader::load('Imager::File::TIFF', $VERSION);
package Imager::Font::W32;
+use 5.006;
use strict;
use Imager;
-use vars qw($VERSION @ISA);
-@ISA = qw(Imager::Font);
+our @ISA = qw(Imager::Font);
BEGIN {
- $VERSION = "0.91";
+ our $VERSION = "0.91";
require XSLoader;
XSLoader::load('Imager::Font::W32', $VERSION);
package Imager::Font::Win32;
+use 5.006;
use strict;
-use vars qw(@ISA);
-@ISA = qw(Imager::Font::W32);
+our @ISA = qw(Imager::Font::W32);
+
+our $VERSION = "1.000";
require Imager::Font::W32;
package Imager::Color;
-
+use 5.006;
use Imager;
use strict;
-use vars qw($VERSION);
-$VERSION = "1.013";
+our $VERSION = "1.013";
# It's just a front end to the XS creation functions.
package Imager::Color::Float;
-
+use 5.006;
use Imager;
use strict;
-use vars qw($VERSION);
-$VERSION = "1.006";
+our $VERSION = "1.006";
# It's just a front end to the XS creation functions.
package Imager::Color::Table;
use strict;
-use vars qw($VERSION);
+use 5.006;
-$VERSION = "1.003";
+our $VERSION = "1.004";
my %colors;
package Imager::Expr;
-
+use 5.006;
use Imager::Regops;
use strict;
-use vars qw($VERSION);
-$VERSION = "1.007";
+our $VERSION = "1.008";
my %expr_types;
}
package Imager::Expr::Postfix;
-use vars qw(@ISA);
-@ISA = qw(Imager::Expr);
+our @ISA = qw(Imager::Expr);
Imager::Expr::Postfix->register_type('rpnexpr');
package Imager::Expr::Infix;
-use vars qw(@ISA);
-@ISA = qw(Imager::Expr);
+our @ISA = qw(Imager::Expr);
use Imager::Regops qw(%Attr $MaxOperands);
{
package Imager::Expr::Assem;
+use 5.006;
use strict;
use Imager::Expr;
use Imager::Regops;
-use vars qw($VERSION);
-$VERSION = "1.003";
+our $VERSION = "1.004";
-use vars qw(@ISA);
-@ISA = qw(Imager::Expr);
+our @ISA = qw(Imager::Expr);
__PACKAGE__->register_type('assem');
package Imager::ExtUtils;
+use 5.006;
use strict;
use File::Spec;
-use vars qw($VERSION);
-
-$VERSION = "1.002";
+our $VERSION = "1.003";
=head1 NAME
package Imager::Fill;
+use 5.006;
use strict;
-use vars qw($VERSION);
-$VERSION = "1.012";
+our $VERSION = "1.013";
# this needs to be kept in sync with the array of hatches in fills.c
my @hatch_types =
package Imager::Font;
-
+use 5.006;
use Imager::Color;
use strict;
-use vars qw($VERSION);
-$VERSION = "1.039";
+our $VERSION = "1.039";
# the aim here is that we can:
# - add file based types in one place: here
package Imager::Font::BBox;
+use 5.006;
use strict;
-use vars qw($VERSION);
-$VERSION = "1.006";
+our $VERSION = "1.007";
=head1 NAME
package Imager::Font::FreeType2;
+use 5.006;
use strict;
use Imager::Font::FT2;
-use vars qw(@ISA $VERSION);
-@ISA = qw(Imager::Font::FT2);
-$VERSION = "1.020";
+our @ISA = qw(Imager::Font::FT2);
+
+our $VERSION = "1.021";
1;
package Imager::Font::Image;
+use 5.006;
use strict;
use Imager::Color;
use File::Basename;
use File::Spec;
-use vars qw(@ISA %REQUIRED_FIELDS);
-@ISA = qw(Imager::Font);
+our @ISA = qw(Imager::Font);
+our $VERSION = "1.000";
sub NWIDTH () { 0 }
sub PWIDTH () { 2 }
sub ASCENT () { 5 }
-%REQUIRED_FIELDS = (
+our %REQUIRED_FIELDS = (
Image_spec => 1,
Font_size => 1,
Global_ascent => 1,
package Imager::Font::Test;
+use 5.006;
use strict;
-our $VERSION = "1.0001";
+our $VERSION = "1.002";
use base 'Imager::Font';
package Imager::Font::Truetype;
+use 5.006;
use strict;
-use vars qw(@ISA $VERSION);
-@ISA = qw(Imager::Font);
-$VERSION = "1.012";
+our @ISA = qw(Imager::Font);
+
+our $VERSION = "1.013";
*_first = \&Imager::Font::_first;
package Imager::Font::Type1;
+use 5.006;
use strict;
use Imager::Font::T1;
-use vars qw(@ISA $VERSION);
-@ISA = qw(Imager::Font::FT2);
-$VERSION = "1.012";
+our @ISA = qw(Imager::Font::T1);
+
+our $VERSION = "1.013";
1;
package Imager::Font::Wrap;
+use 5.006;
use strict;
use Imager;
use Imager::Font;
-use vars qw($VERSION);
-$VERSION = "1.004";
+our $VERSION = "1.005";
*_first = \&Imager::Font::_first;
package Imager::Fountain;
+use 5.006;
use strict;
use Imager::Color::Float;
-use vars qw($VERSION);
-$VERSION = "1.007";
+our $VERSION = "1.008";
=head1 NAME
package Imager::Matrix2d;
+use 5.006;
use strict;
-use vars qw($VERSION);
use Scalar::Util qw(reftype looks_like_number);
use Carp qw(croak);
-$VERSION = "1.012";
+our $VERSION = "1.013";
=head1 NAME
=cut
-use vars qw(@EXPORT_OK %EXPORT_TAGS @ISA);
-@ISA = 'Exporter';
-require 'Exporter.pm';
-@EXPORT_OK = qw(m2d_rotate m2d_identity m2d_translate m2d_shear
+our @ISA = 'Exporter';
+require Exporter;
+our @EXPORT_OK = qw(m2d_rotate m2d_identity m2d_translate m2d_shear
m2d_reflect m2d_scale);
-%EXPORT_TAGS =
+our %EXPORT_TAGS =
(
handy=> [ qw(m2d_rotate m2d_identity m2d_translate m2d_shear
m2d_reflect m2d_scale) ],
package Imager::Preprocess;
+use 5.006;
use strict;
require Exporter;
-use vars qw(@ISA @EXPORT $VERSION);
use Getopt::Long;
use Text::ParseWords;
-@EXPORT = qw(preprocess);
-@ISA = qw(Exporter);
+our @EXPORT = qw(preprocess);
+our @ISA = qw(Exporter);
-$VERSION = "1.001";
+our $VERSION = "1.002";
sub preprocess {
unshift @ARGV, grep /^-/, shellwords($ENV{IMAGER_PREPROCESS_OPTS})
package Imager::Probe;
+use 5.006;
use strict;
use File::Spec;
use Config;
# AUTOMATICALLY GENERATED BY regops.perl
package Imager::Regops;
+use 5.006;
use strict;
require Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK %Attr $MaxOperands $PackCode);
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(%Attr $MaxOperands $PackCode);
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(%Attr $MaxOperands $PackCode);
+our $VERSION = "1.000";
use constant RBC_ADD => 0;
use constant RBC_SUBTRACT => 1;
use constant RBC_DET => 51;
use constant RBC_OP_COUNT => 52;
-@EXPORT = qw(RBC_ADD RBC_SUBTRACT RBC_MULT RBC_DIV RBC_MOD RBC_POW RBC_UMINUS RBC_MULTP RBC_ADDP RBC_SUBTRACTP RBC_SIN RBC_COS RBC_ATAN2 RBC_SQRT RBC_DISTANCE RBC_GETP1 RBC_GETP2 RBC_GETP3 RBC_VALUE RBC_HUE RBC_SAT RBC_HSV RBC_RED RBC_GREEN RBC_BLUE RBC_RGB RBC_INT RBC_IF RBC_IFP RBC_LE RBC_LT RBC_GE RBC_GT RBC_EQ RBC_NE RBC_AND RBC_OR RBC_NOT RBC_ABS RBC_RET RBC_JUMP RBC_JUMPZ RBC_JUMPNZ RBC_SET RBC_SETP RBC_PRINT RBC_RGBA RBC_HSVA RBC_ALPHA RBC_LOG RBC_EXP RBC_DET RBC_OP_COUNT);
+our @EXPORT = qw(RBC_ADD RBC_SUBTRACT RBC_MULT RBC_DIV RBC_MOD RBC_POW RBC_UMINUS RBC_MULTP RBC_ADDP RBC_SUBTRACTP RBC_SIN RBC_COS RBC_ATAN2 RBC_SQRT RBC_DISTANCE RBC_GETP1 RBC_GETP2 RBC_GETP3 RBC_VALUE RBC_HUE RBC_SAT RBC_HSV RBC_RED RBC_GREEN RBC_BLUE RBC_RGB RBC_INT RBC_IF RBC_IFP RBC_LE RBC_LT RBC_GE RBC_GT RBC_EQ RBC_NE RBC_AND RBC_OR RBC_NOT RBC_ABS RBC_RET RBC_JUMP RBC_JUMPZ RBC_JUMPNZ RBC_SET RBC_SETP RBC_PRINT RBC_RGBA RBC_HSVA RBC_ALPHA RBC_LOG RBC_EXP RBC_DET RBC_OP_COUNT);
-%Attr =
+our %Attr =
(
'abs' =>
{
'types' => 'p',
},
);
-$MaxOperands = 4;
-$PackCode = "i";
+our $MaxOperands = 4;
+our $PackCode = "i";
1;
__END__
package Imager::Test;
+use 5.006;
use strict;
use Test::More;
use Test::Builder;
require Exporter;
-use vars qw(@ISA @EXPORT_OK $VERSION);
use Carp qw(croak carp);
use Config;
-$VERSION = "1.004";
+our $VERSION = "1.005";
-@ISA = qw(Exporter);
-@EXPORT_OK =
+our @ISA = qw(Exporter);
+our @EXPORT_OK =
qw(
diff_text_with_nul
test_image_raw
package Imager::Transform;
+use 5.006;
use strict;
use Imager;
use Imager::Expr::Assem;
-use vars qw($VERSION);
-$VERSION = "1.006";
+our $VERSION = "1.007";
my %funcs =
(
print OUT <<'EOS';
# AUTOMATICALLY GENERATED BY regops.perl
package Imager::Regops;
+use 5.006;
use strict;
require Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK %Attr $MaxOperands $PackCode);
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(%Attr $MaxOperands $PackCode);
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(%Attr $MaxOperands $PackCode);
+our $VERSION = "1.000";
EOS
my @ops;
$reg_pack = $1;
}
}
-print OUT "\n\@EXPORT = qw(@ops);\n\n";
+print OUT "\nour \@EXPORT = qw(@ops);\n\n";
# previously we used Data::Dumper, with Sortkeys()
# to make sure the generated code only changed when the data
# changed. Unfortunately Sortkeys isn't supported in some versions of
# perl we try to support, so we now generate this manually
-print OUT "%Attr =\n (\n";
+print OUT "our %Attr =\n (\n";
for my $opname (sort keys %attr) {
my $op = $attr{$opname};
print OUT " '$opname' =>\n {\n";
print OUT " },\n";
}
print OUT " );\n";
-print OUT "\$MaxOperands = $max_opr;\n";
-print OUT qq/\$PackCode = "$reg_pack";\n/;
+print OUT "our \$MaxOperands = $max_opr;\n";
+print OUT qq/our \$PackCode = "$reg_pack";\n/;
print OUT <<'EOS';
1;
my $width = shift || 8;
my $height = shift || 8;
my @spot;
-use vars qw($x $y);
-for $y (0..$height-1) {
- for $x (0..$width-1) {
+for my $y (0..$height-1) {
+ for my $x (0..$width-1) {
my $res = eval $func;
$spot[$x+$y*$width] = $res * $res;
}
package GoodTestFont;
+use 5.006;
use strict;
-use vars '@ISA';
+
+our $VERSION = "1.000";
# this doesn't do enough to be a font
package Pod::Coverage::Imager;
+use 5.006;
use strict;
use base 'Pod::Coverage';
+our $VERSION = "1.000";
+
sub _get_pods {
my $self = shift;
package Imager::File::BAD;
+use 5.006;
use strict;
+our $VERSION = "1.000";
+
die "This module fails to load\n";
1;