Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!perl
- use strict;
- use warnings;
- use PadWalker qw(peek_sub);
- require 'path/to/cpanm';
- my $extract_to = 'lib';
- my $fatpacked = peek_sub($INC[0])->{'%fatpacked'};
- use File::Path qw(make_path);
- use File::Basename;
- for my $path (keys %$fatpacked) {
- make_path dirname "$extract_to/$path";
- open my $fh, '>', "$extract_to/$path" or die "cannot open $path: $!";
- print $fh $fatpacked->{$path};
- close $fh;
- }
Add Comment
Please, Sign In to add comment