@@ -116,8 +116,17 @@ There are various environment variables that will control how a build is done.
116116 generation process if it has heavy dependencies, such as Dist::Zilla, and
117117 testing is being done on a freshly built perl.
118118
119+ Makes a local::lib that is blank.
120+
119121 Defaults to true.
120122
123+ * ` LOCAL_LIB_CACHE `
124+
125+ The directory used to cache the local::lib used if you specify
126+ ` local-lib cache ` .
127+
128+ Defaults to ` $HOME/.perlbrew-cache ` .
129+
121130 * ` CPAN_MIRROR `
122131
123132 The CPAN mirror that dependencies will be installed from.
@@ -278,6 +287,52 @@ Commands
278287 or built if not, and added to the library path. This is taken care
279288 of by the ` build-perl ` step.
280289
290+ There is a special local::lib name you can give:
291+ ` cache ` , which works together with [ Travis's caching
292+ feature] ( https://docs.travis-ci.com/user/caching ) . Its location
293+ defaults to ` $HOME/.perlbrew-cache ` but can be overridden
294+ by supplying the environment variable ` LOCAL_LIB_CACHE ` . Use it
295+ like this:
296+
297+ cache:
298+ directories:
299+ - $HOME/.perlbrew-cache # keeps between builds here
300+ perl:
301+ - "5.8.4@moo"
302+ before_install:
303+ - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
304+ - source ~/travis-perl-helpers/init
305+ - build-perl
306+ - local-lib cache # makes a local::lib from cached
307+ - perl -V
308+ - build-dist
309+ - cd $BUILD_DIR
310+ install:
311+ - cpan-install --deps # installs prereqs, including recommends
312+ before_cache:
313+ - local-lib-cachestore # saves for local::lib next time
314+
315+ Alternatively, this will also work and the ` build-perl ` will do the
316+ ` local-lib ` step for you:
317+
318+ cache:
319+ directories:
320+ - $HOME/.perlbrew-cache # keeps between builds here
321+ perl:
322+ - "5.8.4@cache"
323+ before_install:
324+ - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
325+ - source ~/travis-perl-helpers/init
326+ - build-perl
327+ # no need for local-lib cache
328+ - perl -V
329+ - build-dist
330+ - cd $BUILD_DIR
331+ install:
332+ - cpan-install --deps # installs prereqs, including recommends
333+ before_cache:
334+ - local-lib-cachestore # saves for local::lib next time
335+
281336local::lib
282337----------
283338A number of [ predefined local::lib] ( share/local-libs.txt ) directories are
0 commit comments