Skip to content

Commit

Permalink
Remove mysterious comments and describe the real problem in Changes
Browse files Browse the repository at this point in the history
The earlier change from "use lib" to "BEGIN { unshift @inc, … }" was
meant to solve #462. Alas, "use lib"
cleverly adds more directories to @inc than requested: here it added the
core lib directory before site_perl, making newer versions of dual-life
modules invisible.

The purpose of the FindBin and "use lib" was to allow the script to find
the modules that it was distributed with (script/my_app → lib/MyApp.pm),
but the comment made it seem that the FindBin+BEGIN were needed to make
dual-life modules work. Without comment, the code is unremarkable and
easy to understand.
  • Loading branch information
amenonsen committed Mar 4, 2013
1 parent 94deb00 commit 0b88880
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Changes
Expand Up @@ -2,7 +2,8 @@
3.89 2013-03-04
- Improved documentation.
- Improved tests.
- Fixed scripts to allow dual-life modules to be updated. (jberger, sri)
- Fixed scripts to not "use lib", which sadly breaks updated dual-life
modules. (jberger, sri)
- Fixed bug preventing delayed normalization for reused Mojo::Path objects.
- Fixed path matching bug in Mojo::Path.

Expand Down
1 change: 0 additions & 1 deletion lib/Mojolicious/Command/generate/app.pm
Expand Up @@ -56,7 +56,6 @@ __DATA__
use strict;
use warnings;
# Make sure dual-life modules can be updated
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }
Expand Down
1 change: 0 additions & 1 deletion lib/Mojolicious/Guides/Growing.pod
Expand Up @@ -648,7 +648,6 @@ Only a few small details change.
use strict;
use warnings;

# Make sure dual-life modules can be updated
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }

Expand Down
1 change: 0 additions & 1 deletion script/hypnotoad
Expand Up @@ -3,7 +3,6 @@
use strict;
use warnings;

# Make sure dual-life modules can be updated
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }

Expand Down
1 change: 0 additions & 1 deletion script/mojo
Expand Up @@ -3,7 +3,6 @@
use strict;
use warnings;

# Make sure dual-life modules can be updated
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }

Expand Down
1 change: 0 additions & 1 deletion script/morbo
Expand Up @@ -3,7 +3,6 @@
use strict;
use warnings;

# Make sure dual-life modules can be updated
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }

Expand Down
1 change: 0 additions & 1 deletion t/mojolicious/external/script/my_app
Expand Up @@ -3,7 +3,6 @@
use strict;
use warnings;

# Make sure dual-life modules can be updated
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }

Expand Down

0 comments on commit 0b88880

Please sign in to comment.