Let fcopy look for files containing more than one class name separated by dots

Johannes Plunien johannes.plunien at xing.com
Thu Nov 25 11:37:13 CET 2010


Hi Thomas,

On 25.11.2010, at 11:28, Thomas Lange wrote:

> I wonder what happens if there's a file CLASS4.CLASS5.CLASS6 and the
> client also belongs to those classes. Which file will fcopy choose
> then?

thanks for your feedback. Good question. Currently it's defined by the behaviour of glob() which is bad, in my opinion. Maybe we can use the list of @classes and put a weight there. If you have this list for example: qw(CLASS1 CLASS2 CLASS3 CLASS4 CLASS5 CLASS6). Let's define that the index of the list is the weight of the list item: CLASS1 => 0, CLASS2 => 1 ... CLASS6 => 5
The file CLASS4.CLASS5.CLASS6 would win over CLASS1.CLASS2.CLASS3 etc.

Maybe the whole idea is bad... I'm not sure anymore :)

Thanks,
plu


More information about the linux-fai mailing list