+=head1 FUNCTIONS
+
+=head2 C<abs_path>
+
+ my $absolute_path = abs_path($path);
+
+Forcefully make a path C<$path> absolute (in L<Cwd/abs_path>'s meaning of the term) when it isn't already absolute or when it contains C<'..'>.
+
+=cut
+
+sub abs_path {
+ my ($path) = @_;
+
+ if (File::Spec->file_name_is_absolute($path)) {
+ my $updir = File::Spec->updir;
+ my @chunks = File::Spec->splitdir((File::Spec->splitpath($path))[1]);
+
+ unless (grep $_ eq $updir, @chunks) {
+ return $path;
+ }
+ }
+
+ return Cwd::abs_path($path);
+}
+