… | |
… | |
557 | that are added automatically. Only one (F<.packlist> files) is currently |
557 | that are added automatically. Only one (F<.packlist> files) is currently |
558 | optional and can be influenced, the others are always included: |
558 | optional and can be influenced, the others are always included: |
559 | |
559 | |
560 | =over 4 |
560 | =over 4 |
561 | |
561 | |
562 | =item C<--usepacklist> |
562 | =item C<--usepacklists> |
563 | |
563 | |
564 | Read F<.packlist> files for each distribution that happens to match a |
564 | Read F<.packlist> files for each distribution that happens to match a |
565 | module name you specified. Sounds weird, and it is, so expect semantics to |
565 | module name you specified. Sounds weird, and it is, so expect semantics to |
566 | change somehow in the future. |
566 | change somehow in the future. |
567 | |
567 | |
… | |
… | |
732 | =item Patterns not starting with F</> will be anchored at the end of the path. |
732 | =item Patterns not starting with F</> will be anchored at the end of the path. |
733 | |
733 | |
734 | That is, F<idna.pl> will match any file called F<idna.pl> anywhere in the |
734 | That is, F<idna.pl> will match any file called F<idna.pl> anywhere in the |
735 | hierarchy, but not any directories of the same name. |
735 | hierarchy, but not any directories of the same name. |
736 | |
736 | |
737 | =item A F<*> matches any single component. |
737 | =item A F<*> matches anything within a single path component. |
738 | |
738 | |
739 | That is, F</unicore/*.pl> would match all F<.pl> files directly inside |
739 | That is, F</unicore/*.pl> would match all F<.pl> files directly inside |
740 | C</unicore>, not any deeper level F<.pl> files. Or in other words, F<*> |
740 | C</unicore>, not any deeper level F<.pl> files. Or in other words, F<*> |
741 | will not match slashes. |
741 | will not match slashes. |
742 | |
742 | |
… | |
… | |
1033 | |
1033 | |
1034 | Returns the list of all paths embedded in this binary. |
1034 | Returns the list of all paths embedded in this binary. |
1035 | |
1035 | |
1036 | =back |
1036 | =back |
1037 | |
1037 | |
1038 | =head1 FULLY STATIC BINARIES - BUILDROOT |
1038 | =head1 FULLY STATIC BINARIES - UCLIBC AND BUILDROOT |
1039 | |
1039 | |
1040 | To make truly static (Linux-) libraries, you might want to have a look at |
1040 | To make truly static (Linux-) libraries, you might want to have a look at |
1041 | buildroot (L<http://buildroot.uclibc.org/>). |
1041 | buildroot (L<http://buildroot.uclibc.org/>). |
1042 | |
1042 | |
1043 | Buildroot is primarily meant to set up a cross-compile environment (which |
1043 | Buildroot is primarily meant to set up a cross-compile environment (which |
… | |
… | |
1130 | |
1130 | |
1131 | If you want to handle IRIs or IDNs (L<AnyEvent::Util> punycode and idn |
1131 | If you want to handle IRIs or IDNs (L<AnyEvent::Util> punycode and idn |
1132 | functions), you also need to include C<"AnyEvent/Util/idna.pl"> and |
1132 | functions), you also need to include C<"AnyEvent/Util/idna.pl"> and |
1133 | C<"AnyEvent/Util/uts46data.pl">. |
1133 | C<"AnyEvent/Util/uts46data.pl">. |
1134 | |
1134 | |
1135 | Or you can use C<--usepacklist> and specify C<-MAnyEvent> to include |
1135 | Or you can use C<--usepacklists> and specify C<-MAnyEvent> to include |
1136 | everything. |
1136 | everything. |
1137 | |
1137 | |
1138 | =item Carp |
1138 | =item Carp |
1139 | |
1139 | |
1140 | Carp had (in older versions of perl) a dependency on L<Carp::Heavy>. As of |
1140 | Carp had (in older versions of perl) a dependency on L<Carp::Heavy>. As of |
… | |
… | |
1146 | turn might need L<"Config_heavy.pl">. Including the latter gives you |
1146 | turn might need L<"Config_heavy.pl">. Including the latter gives you |
1147 | both. |
1147 | both. |
1148 | |
1148 | |
1149 | =item Term::ReadLine::Perl |
1149 | =item Term::ReadLine::Perl |
1150 | |
1150 | |
1151 | Also needs L<Term::ReadLine::readline>, or C<--usepacklist>. |
1151 | Also needs L<Term::ReadLine::readline>, or C<--usepacklists>. |
1152 | |
1152 | |
1153 | =item URI |
1153 | =item URI |
1154 | |
1154 | |
1155 | URI implements schemes as separate modules - the generic URL scheme is |
1155 | URI implements schemes as separate modules - the generic URL scheme is |
1156 | implemented in L<URI::_generic>, HTTP is implemented in L<URI::http>. If |
1156 | implemented in L<URI::_generic>, HTTP is implemented in L<URI::http>. If |
1157 | you need to use any of these schemes, you should include these manually, |
1157 | you need to use any of these schemes, you should include these manually, |
1158 | or use C<--usepacklist>. |
1158 | or use C<--usepacklists>. |
1159 | |
1159 | |
1160 | =back |
1160 | =back |
1161 | |
1161 | |
1162 | =head2 RECIPES |
1162 | =head2 RECIPES |
1163 | |
1163 | |
1164 | =over 4 |
1164 | =over 4 |
1165 | |
1165 | |
1166 | =item Linking everything in |
1166 | =item Just link everything in |
1167 | |
1167 | |
1168 | To link just about everything installed in the perl library into a new |
1168 | To link just about everything installed in the perl library into a new |
1169 | perl, try this: |
1169 | perl, try this (the first time this runs it will take a long time, as a |
|
|
1170 | lot of files need to be parsed): |
1170 | |
1171 | |
1171 | staticperl mkperl --strip ppi --incglob '*' |
1172 | staticperl mkperl -v --strip ppi --incglob '*' |
1172 | |
1173 | |
|
|
1174 | If you don't mind the extra megabytes, this can be a very effective way of |
|
|
1175 | creating bundles without having to worry about forgetting any modules. |
|
|
1176 | |
|
|
1177 | You get even more useful variants of this method by first selecting |
|
|
1178 | everything, and then excluding stuff you are reasonable sure not to need - |
|
|
1179 | L<bigperl|http://staticperl.schmorp.de/bigperl.html> uses this approach. |
|
|
1180 | |
1173 | =item Getting rid of netdb function |
1181 | =item Getting rid of netdb functions |
1174 | |
1182 | |
1175 | The perl core has lots of netdb functions (C<getnetbyname>, C<getgrent> |
1183 | The perl core has lots of netdb functions (C<getnetbyname>, C<getgrent> |
1176 | and so on) that few applications use. You can avoid compiling them in by |
1184 | and so on) that few applications use. You can avoid compiling them in by |
1177 | putting the following fragment into a C<preconfigure> hook: |
1185 | putting the following fragment into a C<preconfigure> hook: |
1178 | |
1186 | |