Skip to content

Commit

Permalink
fix new issue
Browse files Browse the repository at this point in the history
  • Loading branch information
oxnz committed Feb 11, 2014
1 parent e70ef88 commit b85d767
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions src/abstract-factory/perl/Factory/FactoryA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ use parent Factory;
use strict;
use warnings;

use Product::ProductA::ProductA1;
use Product::ProductB::ProductB1;
use ProductA::ProductA1;
use ProductB::ProductB1;

sub new {
my ($class, $args) = @_;
return $class->SUPER::new($args);
}

sub createProductA {
return Product::ProductA::ProductA1->new({name => "FA_A#1"});
return ProductA::ProductA1->new({name => "FA_A#1"});
}

sub createProductB {
return Product::ProductB::ProductB1->new({name => "FA_B#1"});
return ProductB::ProductB1->new({name => "FA_B#1"});
}

1;
8 changes: 4 additions & 4 deletions src/abstract-factory/perl/Factory/FactoryB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ use parent Factory;
use strict;
use warnings;

use Product::ProductA;
use Product::ProductB;
use ProductA::ProductA2;
use ProductB::ProductB2;

sub new {
my ($class, $args) = @_;
return $class->SUPER::new($args);
}

sub createProductA {
return Product::ProductA->new({name => "FB_A#1"});
return ProductA::ProductA2->new({name => "FB_A#1"});
}

sub createProductB {
return Product::ProductB->new({name => "FB_B#1"});
return ProductB::ProductB2->new({name => "FB_B#1"});
}

1;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Product::ProductA;
package ProductA;
use parent Product;

sub new {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Prodct::ProductA::ProductA1;
use parent Product::ProductA;
package ProductA::ProductA1;
use parent ProductA;

use strict;
use warnings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Prodct::ProductA::ProductA2;
use parent Product::ProductA;
package ProductA::ProductA2;
use parent ProductA;

use strict;
use warnings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Product::ProductB;
package ProductB;
use parent Product;

sub new {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Prodct::ProductA::ProductB1;
use parent Product::ProductA;
package ProductA::ProductB1;
use parent ProductA;

use strict;
use warnings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Prodct::ProductA::ProductB2;
use parent Product::ProductA;
package ProductA::ProductB2;
use parent ProductA;

use strict;
use warnings;
Expand Down

0 comments on commit b85d767

Please sign in to comment.