no code allowed before use strict. PBP/429. This check found a bug in Asset::Wobject::HttpProxy::Parse.pm

This commit is contained in:
Colin Kuskie 2007-12-05 16:55:40 +00:00
parent 08fbd46d28
commit 98863256ea
9 changed files with 26 additions and 26 deletions

View file

@ -1,5 +1,7 @@
package WebGUI::Commerce::Item;
use strict;
=head1 LEGAL
-------------------------------------------------------------------
@ -170,20 +172,16 @@ The type (namespace) of the item you want.
=cut
sub new {
my ($class, $session, $namespace, $load, $cmd, $plugin);
$class = shift;
$session = shift;
$id = shift;
$namespace = shift;
my ($class, $session, $id, $namespace) = @_;
$session->errorHandler->fatal('No namespace') unless ($namespace);
$session->errorHandler->fatal('No ID') unless ($id);
$cmd = "WebGUI::Commerce::Item::$namespace";
$load = "use $cmd";
my $cmd = "WebGUI::Commerce::Item::$namespace";
my $load = "use $cmd";
eval($load);
$session->errorHandler->warn("Item plugin failed to compile: $cmd.".$@) if($@);
$plugin = eval($cmd.'->new($session, "$id", "$namespace")');
my $plugin = eval($cmd.'->new($session, "$id", "$namespace")');
$session->errorHandler->warn("Couldn't instantiate Item plugin: $cmd.".$@) if($@);
return $plugin;
}

View file

@ -1,5 +1,7 @@
package WebGUI::Commerce::Shipping::ByPrice;
use strict;
=head1 LEGAL
-------------------------------------------------------------------
@ -24,8 +26,6 @@ Shipping plugin for determining shipping cost by a percentage of total price.
our @ISA = qw(WebGUI::Commerce::Shipping);
use strict;
#-------------------------------------------------------------------
=head2 calc ( $session )

View file

@ -1,5 +1,7 @@
package WebGUI::Commerce::Shipping::ByWeight;
use strict;
=head1 LEGAL
-------------------------------------------------------------------
@ -25,8 +27,6 @@ or products being purchased.
our @ISA = qw(WebGUI::Commerce::Shipping);
use strict;
#-------------------------------------------------------------------
=head2 calc ( $session )

View file

@ -1,5 +1,7 @@
package WebGUI::Commerce::Shipping::PerTransaction;
use strict;
=head1 LEGAL
-------------------------------------------------------------------
@ -24,8 +26,6 @@ Shipping plugin for a fixed shipping costs per transaction.
our @ISA = qw(WebGUI::Commerce::Shipping);
use strict;
#-------------------------------------------------------------------
=head2 calc ( $self )