8 bless \my $instace, __PACKAGE__;
12 $instance //= $_[0]->new;
17 open my $version_file, '<', "VERSION" or die 'can not open VERSION file';
18 my $version = <$version_file>;
22 open my $build_file, '<', "BUILD" or die 'can not open BUILD file';
23 my $build = <$build_file>;
25 $version .= '-' . $build;
28 # only allow numbers, letters, points, underscores and dashes. Prevents injecting of malicious code.
29 $version =~ s/[^0-9A-Za-z\.\_\-]//g;
49 my $version = SL::Version->get_version
53 This module is a singleton for the sole reason that SL::Form doesn't have to
60 Creates a new object. Should never be called.
62 =head2 C<get_instance>
64 Creates a singleton instance if none exists and returns.
68 Parses the version from the C<VERSION> file.
70 If the file C<BUILD> exists, appends its contents as a build number.
72 Returns a sanitized version string.
80 Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>