Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use the module Config in B::C #256

Closed
wants to merge 1 commit into from
Closed

Conversation

toddr
Copy link
Collaborator

@toddr toddr commented Oct 15, 2015

Instead of using Config and bloating compiled code, Simply use the generated
B::C::Flags file to store %Config values. Then do a dirty import in B::C so the
code in B::C does not have to be altered.

This should solve a class of problems related to compiling in Config into
binaries that never use Config.

Instead of using Config and bloating compiled code, Simply use the generated
B::C::Flags file to store %Config values. Then do a dirty import in B::C so the
code in B::C does not have to be altered.

This should solve a class of problems related to compiling in Config into
binaries that never use Config.
@atoomic
Copy link
Collaborator

atoomic commented Oct 15, 2015

++ for this commit

@rurban
Copy link
Owner

rurban commented Oct 15, 2015

Smokes are green, but I don't like the bloat in B::C::Flags. we need only 21 from 1222 keys.
It makes more sense to keep this Flags file readable and maintainable. People need to be able to modify and maintain it.

$ perl -nle'/Config\{(.*?)\}/ and print $1' lib/B/C.pm | sort -u
archname
cc
ccflags
d_c99_variadic_macros
d_longdbl
dlext
i_dlfcn
ivdformat
ivsize
longsize
mad
nvgformat
ptrsize
static_ext
usecperl
usedl
useithreads
uselongdouble
usemultiplicity
usemymalloc
uvuformat

@toddr
Copy link
Collaborator Author

toddr commented Oct 15, 2015

And when you add key 15, what happens when you forget to update Makefile.PL to be sure it's listed there?

@toddr
Copy link
Collaborator Author

toddr commented Oct 15, 2015

B::C::Flags should be excluded from the binary so I see no reason why the bloat would be any different?

@rurban
Copy link
Owner

rurban commented Oct 15, 2015

When a key is added, you'll get an empty value, yes.

@rurban
Copy link
Owner

rurban commented Oct 15, 2015

Waiting for branch no_Config with f1cd880

@rurban
Copy link
Owner

rurban commented Oct 16, 2015

f1cd880 broke it, investigating.

missed the d_dlopen key. made it now a restricted hash to error when missing a key with eab6e43

@rurban
Copy link
Owner

rurban commented Oct 16, 2015

Merged 3 commits with eab6e43

@rurban rurban closed this Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants