Kyle> $hash->{variant}{xwin} = the contents of the variant foo
Kyle> $hash->{variant}{xwin}{cppflags} = the CPPFlags used when compiling
Kyle> with xwindows support
I hope you realize you can't use both of these at the same time.
If $hash->{variant}{xwin}{cppflags} is active, then $hash->{variant}{xwin}
has to be a hashref, stringifying as HASH(0xNNNNN).
Common error, want to make sure you're not making same.
I was not referring to those as strings, but I was intending for $hash->{variant}{xwin} to be a hashref. The current (old) package hash looks like:
{
cppflags => "-I/usr/X11R6/include",
ldflags => "-L/usr/X11R6/lib",
[...]
}
I was thinking that we could store variants in a form like this
{
cppflags => "-I/usr/X11R6/include",
ldflags => "-L/usr/X11R6/lib",
variants => [ "foo", "bar", "nox" ],
variant => {
foo => {
cppflags => "-I/sw/include/foo/include",
ldflags => "-L/sw/lib/foo/lib",
[...]
},
bar => {
cppflags => "-I/sw/include/bar/include",
ldflags => "-L/sw/lib/bar/lib",
[...]
},
nox => {
cppflags => "",
ldflags => "",
[...]
},
},
[...]
}
Though ideally, xwindows support would be added (like variant xwin) instead of subtracted (like variant nox).
Kyle Moffett