~ubuntu-branches/ubuntu/quantal/libfile-fu-perl/quantal

« back to all changes in this revision

Viewing changes to lib/File/Fu/File.pm

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann, Jonathan Yu, Salvatore Bonaccorso, Ryan Niebur, gregor herrmann
  • Date: 2010-03-06 20:02:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100306200211-tj6mzzjkofmp8kg3
Tags: 0.0.7-1
[ Jonathan Yu ]
* New upstream release
* Standards-Version 3.8.4 (no changes)
* Rewrite control description

[ Salvatore Bonaccorso ]
* debian/control: Changed: Replace versioned (build-)dependency on
  perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as
  permitted by Debian Policy 3.8.3).

[ Ryan Niebur ]
* Update jawnsy's email address

[ gregor herrmann ]
* debian/control: Changed: (build-)depend on perl instead of perl-
  modules.
* Add /me to Uploaders.
* Convert to source format 3.0 (quilt).
* Add patch to fix a spelling mistake.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
package File::Fu::File;
2
 
$VERSION = v0.0.6;
 
2
$VERSION = v0.0.7;
3
3
 
4
4
use warnings;
5
5
use strict;
320
320
# TODO
321
321
# my $link = $file->dwimlink(absolute|relative|samedir => $linkname);
322
322
 
323
 
=head2 rename
324
 
 
325
 
Calls the builtin rename() on the $file and returns a new object with
326
 
that name.
327
 
 
328
 
  $file = $file->rename($newname);
329
 
 
330
 
=cut
331
 
 
332
 
sub rename :method {
333
 
  my $self = shift;
334
 
  my ($name) = @_;
335
 
 
336
 
  rename($self, $name) or
337
 
    croak("cannot rename '$self' to '$name' $!");
338
 
  return($self->new($name));
339
 
} # end subroutine rename definition
340
 
########################################################################
341
 
 
342
323
=head2 unlink
343
324
 
344
325
  $file->unlink;