-=head2 sql_file_list
-
- my $list = $installer->sql_file_list($lang, $marcflavour, $subset_wanted);
-
-Returns an arrayref containing the filepaths of installer SQL scripts
-available for laod. The C<$lang> and C<$marcflavour> arguments
-specify the desired language and MARC flavour. while C<$subset_wanted>
-is a hashref containing possible named parameters 'mandatory' and 'optional'.
-
-=cut
-
-sub sql_file_list {
- my $self = shift;
- my $lang = shift;
- my $marcflavour = shift;
- my $subset_wanted = shift;
-
- my ($marc_defaulted_to_en, $marc_sql) = $self->marc_framework_sql_list($lang, $marcflavour);
- my ($sample_defaulted_to_en, $sample_sql) = $self->sample_data_sql_list($lang);
-
- my @sql_list = ();
- map {
- map {
- if ($subset_wanted->{'mandatory'}) {
- push @sql_list, $_->{'fwkfile'} if $_->{'mandatory'};
- }
- if ($subset_wanted->{'optional'}) {
- push @sql_list, $_->{'fwkfile'} unless $_->{'mandatory'};
- }
- } @{ $_->{'frameworks'} }
- } (@$marc_sql, @$sample_sql);
-
- return \@sql_list
-}
-